Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 273653
b: refs/heads/master
c: b0050e4
h: refs/heads/master
i:
  273651: c3c6043
v: v3
  • Loading branch information
Guennadi Liakhovetski authored and Mauro Carvalho Chehab committed Nov 3, 2011
1 parent 393eb22 commit fe45df9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 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: e1db704326c9a5164da4e24b01e487c0be687fa2
refs/heads/master: b0050e41bad1789ab5aeec15c3687a73e075b955
10 changes: 4 additions & 6 deletions trunk/drivers/media/video/soc_camera.c
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ static int soc_camera_open(struct file *file)
struct soc_camera_host *ici;
int ret;

if (!icd->ops)
if (!to_soc_camera_control(icd))
/* No device driver attached */
return -ENODEV;

Expand Down Expand Up @@ -835,6 +835,9 @@ static int soc_camera_queryctrl(struct file *file, void *priv,
return 0;
}

if (!icd->ops)
return -EINVAL;

/* Then device controls */
for (i = 0; i < icd->ops->num_controls; i++)
if (qc->id == icd->ops->controls[i].id) {
Expand Down Expand Up @@ -1461,11 +1464,6 @@ static int soc_camera_video_start(struct soc_camera_device *icd)
if (!icd->parent)
return -ENODEV;

if (!icd->ops ||
!icd->ops->query_bus_param ||
!icd->ops->set_bus_param)
return -EINVAL;

ret = video_register_device(icd->vdev, VFL_TYPE_GRABBER, -1);
if (ret < 0) {
dev_err(icd->pdev, "video_register_device failed: %d\n", ret);
Expand Down

0 comments on commit fe45df9

Please sign in to comment.