Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 271816
b: refs/heads/master
c: b57ce41
h: refs/heads/master
v: v3
  • Loading branch information
Arvydas Sidorenko authored and Mauro Carvalho Chehab committed Sep 18, 2011
1 parent fe72d3a commit c86d844
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 47a7e6f8d282d199f14abbb068c6c3ba00cb7bfc
refs/heads/master: b57ce4179b502b3f481f7632da20aae3e488e31a
18 changes: 8 additions & 10 deletions trunk/drivers/media/video/stk-webcam.c
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ static int stk_prepare_sio_buffers(struct stk_camera *dev, unsigned n_sbufs)
return -ENOMEM;
for (i = 0; i < n_sbufs; i++) {
if (stk_setup_siobuf(dev, i))
return (dev->n_sbufs > 1)? 0 : -ENOMEM;
return (dev->n_sbufs > 1 ? 0 : -ENOMEM);
dev->n_sbufs = i+1;
}
}
Expand Down Expand Up @@ -558,9 +558,8 @@ static int v4l_stk_open(struct file *fp)
vdev = video_devdata(fp);
dev = vdev_to_camera(vdev);

if (dev == NULL || !is_present(dev)) {
if (dev == NULL || !is_present(dev))
return -ENXIO;
}
fp->private_data = dev;
usb_autopm_get_interface(dev->interface);

Expand All @@ -579,7 +578,7 @@ static int v4l_stk_release(struct file *fp)
dev->owner = NULL;
}

if(is_present(dev))
if (is_present(dev))
usb_autopm_put_interface(dev->interface);

return 0;
Expand Down Expand Up @@ -656,7 +655,7 @@ static unsigned int v4l_stk_poll(struct file *fp, poll_table *wait)
return POLLERR;

if (!list_empty(&dev->sio_full))
return (POLLIN | POLLRDNORM);
return POLLIN | POLLRDNORM;

return 0;
}
Expand Down Expand Up @@ -893,9 +892,9 @@ static int stk_vidioc_g_fmt_vid_cap(struct file *filp,
struct stk_camera *dev = priv;
int i;

for (i = 0; i < ARRAY_SIZE(stk_sizes)
&& stk_sizes[i].m != dev->vsettings.mode;
i++);
for (i = 0; i < ARRAY_SIZE(stk_sizes) &&
stk_sizes[i].m != dev->vsettings.mode; i++)
;
if (i == ARRAY_SIZE(stk_sizes)) {
STK_ERROR("ERROR: mode invalid\n");
return -EINVAL;
Expand Down Expand Up @@ -1307,9 +1306,8 @@ static int stk_camera_probe(struct usb_interface *interface,
usb_set_intfdata(interface, dev);

err = stk_register_video_device(dev);
if (err) {
if (err)
goto error;
}

return 0;

Expand Down

0 comments on commit c86d844

Please sign in to comment.