aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorArvydas Sidorenko <asido4@gmail.com>2011-09-13 06:18:11 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-09-18 07:13:10 -0400
commitb57ce4179b502b3f481f7632da20aae3e488e31a (patch)
treedc1d14ccfc6a6d166db336d4a5ab467293e77cf3 /drivers/media
parent47a7e6f8d282d199f14abbb068c6c3ba00cb7bfc (diff)
[media] drivers/media/video/stk-webcam.c: coding style issue
checkpatch.pl gave some coding style errors, so on the way to the first patch I added the fix to them. Signed-off-by: Arvydas Sidorenko <asido4@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/video/stk-webcam.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/drivers/media/video/stk-webcam.c b/drivers/media/video/stk-webcam.c
index 859e78fc1aa3..5fc6bbc165fa 100644
--- a/drivers/media/video/stk-webcam.c
+++ b/drivers/media/video/stk-webcam.c
@@ -518,7 +518,7 @@ static int stk_prepare_sio_buffers(struct stk_camera *dev, unsigned n_sbufs)
518 return -ENOMEM; 518 return -ENOMEM;
519 for (i = 0; i < n_sbufs; i++) { 519 for (i = 0; i < n_sbufs; i++) {
520 if (stk_setup_siobuf(dev, i)) 520 if (stk_setup_siobuf(dev, i))
521 return (dev->n_sbufs > 1)? 0 : -ENOMEM; 521 return (dev->n_sbufs > 1 ? 0 : -ENOMEM);
522 dev->n_sbufs = i+1; 522 dev->n_sbufs = i+1;
523 } 523 }
524 } 524 }
@@ -558,9 +558,8 @@ static int v4l_stk_open(struct file *fp)
558 vdev = video_devdata(fp); 558 vdev = video_devdata(fp);
559 dev = vdev_to_camera(vdev); 559 dev = vdev_to_camera(vdev);
560 560
561 if (dev == NULL || !is_present(dev)) { 561 if (dev == NULL || !is_present(dev))
562 return -ENXIO; 562 return -ENXIO;
563 }
564 fp->private_data = dev; 563 fp->private_data = dev;
565 usb_autopm_get_interface(dev->interface); 564 usb_autopm_get_interface(dev->interface);
566 565
@@ -579,7 +578,7 @@ static int v4l_stk_release(struct file *fp)
579 dev->owner = NULL; 578 dev->owner = NULL;
580 } 579 }
581 580
582 if(is_present(dev)) 581 if (is_present(dev))
583 usb_autopm_put_interface(dev->interface); 582 usb_autopm_put_interface(dev->interface);
584 583
585 return 0; 584 return 0;
@@ -656,7 +655,7 @@ static unsigned int v4l_stk_poll(struct file *fp, poll_table *wait)
656 return POLLERR; 655 return POLLERR;
657 656
658 if (!list_empty(&dev->sio_full)) 657 if (!list_empty(&dev->sio_full))
659 return (POLLIN | POLLRDNORM); 658 return POLLIN | POLLRDNORM;
660 659
661 return 0; 660 return 0;
662} 661}
@@ -893,9 +892,9 @@ static int stk_vidioc_g_fmt_vid_cap(struct file *filp,
893 struct stk_camera *dev = priv; 892 struct stk_camera *dev = priv;
894 int i; 893 int i;
895 894
896 for (i = 0; i < ARRAY_SIZE(stk_sizes) 895 for (i = 0; i < ARRAY_SIZE(stk_sizes) &&
897 && stk_sizes[i].m != dev->vsettings.mode; 896 stk_sizes[i].m != dev->vsettings.mode; i++)
898 i++); 897 ;
899 if (i == ARRAY_SIZE(stk_sizes)) { 898 if (i == ARRAY_SIZE(stk_sizes)) {
900 STK_ERROR("ERROR: mode invalid\n"); 899 STK_ERROR("ERROR: mode invalid\n");
901 return -EINVAL; 900 return -EINVAL;
@@ -1307,9 +1306,8 @@ static int stk_camera_probe(struct usb_interface *interface,
1307 usb_set_intfdata(interface, dev); 1306 usb_set_intfdata(interface, dev);
1308 1307
1309 err = stk_register_video_device(dev); 1308 err = stk_register_video_device(dev);
1310 if (err) { 1309 if (err)
1311 goto error; 1310 goto error;
1312 }
1313 1311
1314 return 0; 1312 return 0;
1315 1313