diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-03-03 13:31:36 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-03-03 13:31:36 -0300 |
commit | 1e59b30169044ec05336c5df466b489b4f98c587 (patch) | |
tree | ba8bd6cd204ca132c63230962a7447a1e11f3bd1 /linux/drivers/media/video/cx231xx/cx231xx-audio.c | |
parent | 92ce95e9f4fce5fb4deea9cd33e0723190d93498 (diff) | |
download | mediapointer-dvb-s2-1e59b30169044ec05336c5df466b489b4f98c587.tar.gz mediapointer-dvb-s2-1e59b30169044ec05336c5df466b489b4f98c587.tar.bz2 |
cx231xx: First series of manual CodingStyle fixes
From: Mauro Carvalho Chehab <mchehab@redhat.com>
This patch cleans up CodingStyle on the following source files:
There are still much more to be fixed on later patches
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'linux/drivers/media/video/cx231xx/cx231xx-audio.c')
-rw-r--r-- | linux/drivers/media/video/cx231xx/cx231xx-audio.c | 55 |
1 files changed, 24 insertions, 31 deletions
diff --git a/linux/drivers/media/video/cx231xx/cx231xx-audio.c b/linux/drivers/media/video/cx231xx/cx231xx-audio.c index b6db68a5c..69e5e6ed5 100644 --- a/linux/drivers/media/video/cx231xx/cx231xx-audio.c +++ b/linux/drivers/media/video/cx231xx/cx231xx-audio.c @@ -71,7 +71,6 @@ static int cx231xx_isoc_audio_deinit(struct cx231xx *dev) kfree(dev->adev.transfer_buffer[i]); dev->adev.transfer_buffer[i] = NULL; - } } @@ -121,10 +120,10 @@ static void cx231xx_audio_isocirq(struct urb *urb) stride = runtime->frame_bits >> 3; for (i = 0; i < urb->number_of_packets; i++) { - int length = - urb->iso_frame_desc[i].actual_length / stride; + int length = urb->iso_frame_desc[i].actual_length / + stride; cp = (unsigned char *)urb->transfer_buffer + - urb->iso_frame_desc[i].offset; + urb->iso_frame_desc[i].offset; if (!length) continue; @@ -134,8 +133,9 @@ static void cx231xx_audio_isocirq(struct urb *urb) #endif oldptr = dev->adev.hwptr_done_capture; if (oldptr + length >= runtime->buffer_size) { - unsigned int cnt = - runtime->buffer_size - oldptr; + unsigned int cnt; + + cnt = runtime->buffer_size - oldptr; memcpy(runtime->dma_area + oldptr * stride, cp, cnt * stride); memcpy(runtime->dma_area, cp + cnt * stride, @@ -150,16 +150,12 @@ static void cx231xx_audio_isocirq(struct urb *urb) #endif dev->adev.hwptr_done_capture += length; - if (dev->adev.hwptr_done_capture >= - runtime->buffer_size) - dev->adev.hwptr_done_capture -= - runtime->buffer_size; + if (dev->adev.hwptr_done_capture >= runtime->buffer_size) + dev->adev.hwptr_done_capture -= runtime->buffer_size; dev->adev.capture_transfer_done += length; - if (dev->adev.capture_transfer_done >= - runtime->period_size) { - dev->adev.capture_transfer_done -= - runtime->period_size; + if (dev->adev.capture_transfer_done >= runtime->period_size) { + dev->adev.capture_transfer_done -= runtime->period_size; period_elapsed = 1; } #ifdef NO_PCM_LOCK @@ -211,8 +207,7 @@ static int cx231xx_init_audio_isoc(struct cx231xx *dev) urb->dev = dev->udev; urb->context = dev; - urb->pipe = - usb_rcvisocpipe(dev->udev, dev->adev.end_point_addr); + urb->pipe = usb_rcvisocpipe(dev->udev, dev->adev.end_point_addr); urb->transfer_flags = URB_ISO_ASAP; urb->transfer_buffer = dev->adev.transfer_buffer[i]; urb->interval = 1; @@ -220,8 +215,7 @@ static int cx231xx_init_audio_isoc(struct cx231xx *dev) urb->number_of_packets = CX231XX_NUM_AUDIO_PACKETS; urb->transfer_buffer_length = sb_size; - for (j = k = 0; j < CX231XX_NUM_AUDIO_PACKETS; - j++, k += dev->adev.max_pkt_size) { + for (j = k = 0; j < CX231XX_NUM_AUDIO_PACKETS; j++, k += dev->adev.max_pkt_size) { urb->iso_frame_desc[j].offset = k; urb->iso_frame_desc[j].length = dev->adev.max_pkt_size; } @@ -263,7 +257,7 @@ static int cx231xx_cmd(struct cx231xx *dev, int cmd, int arg) } #if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 16) -static int snd_pcm_alloc_vmalloc_buffer(snd_pcm_substream_t * subs, size_t size) +static int snd_pcm_alloc_vmalloc_buffer(snd_pcm_substream_t *subs, size_t size) #else static int snd_pcm_alloc_vmalloc_buffer(struct snd_pcm_substream *subs, size_t size) @@ -309,14 +303,14 @@ static struct snd_pcm_hardware snd_cx231xx_hw_capture = { .channels_min = 2, .channels_max = 2, .buffer_bytes_max = 62720 * 8, /* just about the value in usbaudio.c */ - .period_bytes_min = 64, /* 12544/2, */ + .period_bytes_min = 64, /* 12544/2, */ .period_bytes_max = 12544, .periods_min = 2, - .periods_max = 98, /* 12544, */ + .periods_max = 98, /* 12544, */ }; #if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 16) -static int snd_cx231xx_capture_open(snd_pcm_substream_t * substream) +static int snd_cx231xx_capture_open(snd_pcm_substream_t *substream) #else static int snd_cx231xx_capture_open(struct snd_pcm_substream *substream) #endif @@ -365,7 +359,7 @@ static int snd_cx231xx_capture_open(struct snd_pcm_substream *substream) } #if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 16) -static int snd_cx231xx_pcm_close(snd_pcm_substream_t * substream) +static int snd_cx231xx_pcm_close(snd_pcm_substream_t *substream) #else static int snd_cx231xx_pcm_close(struct snd_pcm_substream *substream) #endif @@ -402,8 +396,8 @@ static int snd_cx231xx_pcm_close(struct snd_pcm_substream *substream) } #if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 16) -static int snd_cx231xx_hw_capture_params(snd_pcm_substream_t * substream, - snd_pcm_hw_params_t * hw_params) +static int snd_cx231xx_hw_capture_params(snd_pcm_substream_t *substream, + snd_pcm_hw_params_t *hw_params) #else static int snd_cx231xx_hw_capture_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *hw_params) @@ -427,7 +421,7 @@ static int snd_cx231xx_hw_capture_params(struct snd_pcm_substream *substream, } #if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 16) -static int snd_cx231xx_hw_capture_free(snd_pcm_substream_t * substream) +static int snd_cx231xx_hw_capture_free(snd_pcm_substream_t *substream) #else static int snd_cx231xx_hw_capture_free(struct snd_pcm_substream *substream) #endif @@ -443,7 +437,7 @@ static int snd_cx231xx_hw_capture_free(struct snd_pcm_substream *substream) } #if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 16) -static int snd_cx231xx_prepare(snd_pcm_substream_t * substream) +static int snd_cx231xx_prepare(snd_pcm_substream_t *substream) #else static int snd_cx231xx_prepare(struct snd_pcm_substream *substream) #endif @@ -452,7 +446,7 @@ static int snd_cx231xx_prepare(struct snd_pcm_substream *substream) } #if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 16) -static int snd_cx231xx_capture_trigger(snd_pcm_substream_t * substream, int cmd) +static int snd_cx231xx_capture_trigger(snd_pcm_substream_t *substream, int cmd) #else static int snd_cx231xx_capture_trigger(struct snd_pcm_substream *substream, int cmd) @@ -485,7 +479,7 @@ static int snd_cx231xx_capture_trigger(struct snd_pcm_substream *substream, #if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 16) static snd_pcm_uframes_t snd_cx231xx_capture_pointer(snd_pcm_substream_t - * substream) + *substream) #else static snd_pcm_uframes_t snd_cx231xx_capture_pointer(struct snd_pcm_substream *substream) @@ -559,9 +553,8 @@ static int cx231xx_audio_init(struct cx231xx *dev) "non standard usbaudio\n"); card = snd_card_new(index[devnr], "Cx231xx Audio", THIS_MODULE, 0); - if (card == NULL) { + if (card == NULL) return -ENOMEM; - } spin_lock_init(&adev->slock); err = snd_pcm_new(card, "Cx231xx Audio", 0, 0, 1, &pcm); |