diff options
author | Leonid V. Fedorenchik <leonidsbox@gmail.com> | 2011-10-22 00:43:55 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-11-24 16:03:07 -0500 |
commit | 0abfefbe497d8d2a173f70aa3beac89a01fc1f51 (patch) | |
tree | da11b06a582179167063ad2f37cb385ab9247de5 /drivers/media/video/cx25821 | |
parent | f253981406c9f9f79d6439fc2bd31fd1a10f68cb (diff) |
[media] cx25821-video.c: Change line endings
Change obscure line endings to less obscure ones. (improve readability)
Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/cx25821')
-rw-r--r-- | drivers/media/video/cx25821/cx25821-video.c | 47 |
1 files changed, 22 insertions, 25 deletions
diff --git a/drivers/media/video/cx25821/cx25821-video.c b/drivers/media/video/cx25821/cx25821-video.c index fce203c747b..ffd8bc79c02 100644 --- a/drivers/media/video/cx25821/cx25821-video.c +++ b/drivers/media/video/cx25821/cx25821-video.c | |||
@@ -140,8 +140,8 @@ void cx25821_video_wakeup(struct cx25821_dev *dev, struct cx25821_dmaqueue *q, | |||
140 | break; | 140 | break; |
141 | } | 141 | } |
142 | 142 | ||
143 | buf = | 143 | buf = list_entry(q->active.next, struct cx25821_buffer, |
144 | list_entry(q->active.next, struct cx25821_buffer, vb.queue); | 144 | vb.queue); |
145 | 145 | ||
146 | /* count comes from the hw and it is 16bit wide -- | 146 | /* count comes from the hw and it is 16bit wide -- |
147 | * this trick handles wrap-arounds correctly for | 147 | * this trick handles wrap-arounds correctly for |
@@ -318,8 +318,8 @@ int cx25821_restart_video_queue(struct cx25821_dev *dev, | |||
318 | struct list_head *item; | 318 | struct list_head *item; |
319 | 319 | ||
320 | if (!list_empty(&q->active)) { | 320 | if (!list_empty(&q->active)) { |
321 | buf = | 321 | buf = list_entry(q->active.next, struct cx25821_buffer, |
322 | list_entry(q->active.next, struct cx25821_buffer, vb.queue); | 322 | vb.queue); |
323 | 323 | ||
324 | cx25821_start_video_dma(dev, q, buf, channel); | 324 | cx25821_start_video_dma(dev, q, buf, channel); |
325 | 325 | ||
@@ -337,8 +337,8 @@ int cx25821_restart_video_queue(struct cx25821_dev *dev, | |||
337 | if (list_empty(&q->queued)) | 337 | if (list_empty(&q->queued)) |
338 | return 0; | 338 | return 0; |
339 | 339 | ||
340 | buf = | 340 | buf = list_entry(q->queued.next, struct cx25821_buffer, |
341 | list_entry(q->queued.next, struct cx25821_buffer, vb.queue); | 341 | vb.queue); |
342 | 342 | ||
343 | if (NULL == prev) { | 343 | if (NULL == prev) { |
344 | list_move_tail(&buf->vb.queue, &q->active); | 344 | list_move_tail(&buf->vb.queue, &q->active); |
@@ -375,8 +375,8 @@ void cx25821_vid_timeout(unsigned long data) | |||
375 | 375 | ||
376 | spin_lock_irqsave(&dev->slock, flags); | 376 | spin_lock_irqsave(&dev->slock, flags); |
377 | while (!list_empty(&q->active)) { | 377 | while (!list_empty(&q->active)) { |
378 | buf = | 378 | buf = list_entry(q->active.next, struct cx25821_buffer, |
379 | list_entry(q->active.next, struct cx25821_buffer, vb.queue); | 379 | vb.queue); |
380 | list_del(&buf->vb.queue); | 380 | list_del(&buf->vb.queue); |
381 | 381 | ||
382 | buf->vb.state = VIDEOBUF_ERROR; | 382 | buf->vb.state = VIDEOBUF_ERROR; |
@@ -498,15 +498,14 @@ int cx25821_video_register(struct cx25821_dev *dev) | |||
498 | dev->channels[i].timeout_data.dev = dev; | 498 | dev->channels[i].timeout_data.dev = dev; |
499 | dev->channels[i].timeout_data.channel = | 499 | dev->channels[i].timeout_data.channel = |
500 | &cx25821_sram_channels[i]; | 500 | &cx25821_sram_channels[i]; |
501 | dev->channels[i].vidq.timeout.function = | 501 | dev->channels[i].vidq.timeout.function = cx25821_vid_timeout; |
502 | cx25821_vid_timeout; | ||
503 | dev->channels[i].vidq.timeout.data = | 502 | dev->channels[i].vidq.timeout.data = |
504 | (unsigned long)&dev->channels[i].timeout_data; | 503 | (unsigned long)&dev->channels[i].timeout_data; |
505 | init_timer(&dev->channels[i].vidq.timeout); | 504 | init_timer(&dev->channels[i].vidq.timeout); |
506 | 505 | ||
507 | /* register v4l devices */ | 506 | /* register v4l devices */ |
508 | dev->channels[i].video_dev = cx25821_vdev_init(dev, | 507 | dev->channels[i].video_dev = cx25821_vdev_init(dev, dev->pci, |
509 | dev->pci, &cx25821_video_device, "video"); | 508 | &cx25821_video_device, "video"); |
510 | 509 | ||
511 | err = video_register_device(dev->channels[i].video_dev, | 510 | err = video_register_device(dev->channels[i].video_dev, |
512 | VFL_TYPE_GRABBER, video_nr[dev->nr]); | 511 | VFL_TYPE_GRABBER, video_nr[dev->nr]); |
@@ -619,10 +618,9 @@ int cx25821_buffer_prepare(struct videobuf_queue *q, struct videobuf_buffer *vb, | |||
619 | dev->tvnorm & V4L2_STD_PAL_DK) | 618 | dev->tvnorm & V4L2_STD_PAL_DK) |
620 | bpl_local = 352 << 1; | 619 | bpl_local = 352 << 1; |
621 | else | 620 | else |
622 | bpl_local = | 621 | bpl_local = dev->channels[ |
623 | dev->channels[channel_opened]. | 622 | channel_opened]. |
624 | cif_width << | 623 | cif_width << 1; |
625 | 1; | ||
626 | } | 624 | } |
627 | } | 625 | } |
628 | } | 626 | } |
@@ -846,11 +844,10 @@ static int video_open(struct file *file) | |||
846 | 844 | ||
847 | v4l2_prio_open(&dev->channels[ch_id].prio, &fh->prio); | 845 | v4l2_prio_open(&dev->channels[ch_id].prio, &fh->prio); |
848 | 846 | ||
849 | videobuf_queue_sg_init(&fh->vidq, &cx25821_video_qops, | 847 | videobuf_queue_sg_init(&fh->vidq, &cx25821_video_qops, &dev->pci->dev, |
850 | &dev->pci->dev, &dev->slock, | 848 | &dev->slock, V4L2_BUF_TYPE_VIDEO_CAPTURE, |
851 | V4L2_BUF_TYPE_VIDEO_CAPTURE, | 849 | V4L2_FIELD_INTERLACED, sizeof(struct cx25821_buffer), |
852 | V4L2_FIELD_INTERLACED, | 850 | fh, NULL); |
853 | sizeof(struct cx25821_buffer), fh, NULL); | ||
854 | 851 | ||
855 | dprintk(1, "post videobuf_queue_init()\n"); | 852 | dprintk(1, "post videobuf_queue_init()\n"); |
856 | mutex_unlock(&cx25821_devlist_mutex); | 853 | mutex_unlock(&cx25821_devlist_mutex); |
@@ -1166,8 +1163,8 @@ int cx25821_vidioc_querycap(struct file *file, void *priv, | |||
1166 | strlcpy(cap->card, cx25821_boards[dev->board].name, sizeof(cap->card)); | 1163 | strlcpy(cap->card, cx25821_boards[dev->board].name, sizeof(cap->card)); |
1167 | sprintf(cap->bus_info, "PCIe:%s", pci_name(dev->pci)); | 1164 | sprintf(cap->bus_info, "PCIe:%s", pci_name(dev->pci)); |
1168 | cap->version = CX25821_VERSION_CODE; | 1165 | cap->version = CX25821_VERSION_CODE; |
1169 | cap->capabilities = | 1166 | cap->capabilities = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_READWRITE | |
1170 | V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_READWRITE | V4L2_CAP_STREAMING; | 1167 | V4L2_CAP_STREAMING; |
1171 | if (UNSET != dev->tuner_type) | 1168 | if (UNSET != dev->tuner_type) |
1172 | cap->capabilities |= V4L2_CAP_TUNER; | 1169 | cap->capabilities |= V4L2_CAP_TUNER; |
1173 | return 0; | 1170 | return 0; |
@@ -1897,8 +1894,8 @@ static long video_ioctl_set(struct file *file, unsigned int cmd, | |||
1897 | } | 1894 | } |
1898 | 1895 | ||
1899 | if (selected_channel <= 7 && selected_channel >= 0) { | 1896 | if (selected_channel <= 7 && selected_channel >= 0) { |
1900 | dev->channels[selected_channel]. | 1897 | dev->channels[selected_channel].use_cif_resolution = |
1901 | use_cif_resolution = cif_enable; | 1898 | cif_enable; |
1902 | dev->channels[selected_channel].cif_width = width; | 1899 | dev->channels[selected_channel].cif_width = width; |
1903 | } else { | 1900 | } else { |
1904 | for (i = 0; i < VID_CHANNEL_NUM; i++) { | 1901 | for (i = 0; i < VID_CHANNEL_NUM; i++) { |