summary refs log tree commit diff
path: root/drivers/media/video/soc_camera.c
diff options
context:
space:
mode:
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>2009-08-25 11:46:54 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-09-19 00:19:06 -0300
commit08590b9613f7f624fe3a052586eea2dbb3584b38 (patch)
treea893d250a4edf84e93794be59e2b1d859314c972 /drivers/media/video/soc_camera.c
parent961801bbb3448a86f0cc93747cecbfae686d81d1 (diff)
downloadlinux-08590b9613f7f624fe3a052586eea2dbb3584b38.tar.gz
V4L/DVB (12529): soc-camera: switch to s_crop v4l2-subdev video operation
Remove set_crop soc-camera device method and switch to s_crop from v4l2-subdev
video operations. Also extend non-i2c drivers to also hold a pointer to their
v4l2-subdev instance in control device driver-data, i.e., in
dev_get_drvdata((struct device *)to_soc_camera_control(icd))

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/soc_camera.c')
-rw-r--r--drivers/media/video/soc_camera.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/video/soc_camera.c b/drivers/media/video/soc_camera.c
index 21a8aa586da5..d9ccc2866592 100644
--- a/drivers/media/video/soc_camera.c
+++ b/drivers/media/video/soc_camera.c
@@ -797,7 +797,7 @@ static int soc_camera_s_crop(struct file *file, void *fh,
 		rect.top = icd->rect_max.height + icd->rect_max.top -
 			rect.height;
 
-	ret = ici->ops->set_crop(icd, &rect);
+	ret = ici->ops->set_crop(icd, a);
 	if (!ret)
 		icd->rect_current = rect;
 
@@ -970,7 +970,7 @@ static int soc_camera_probe(struct device *dev)
 
 		/* FIXME: this is racy, have to use driver-binding notification */
 		control = to_soc_camera_control(icd);
-		if (!control || !control->driver ||
+		if (!control || !control->driver || !dev_get_drvdata(control) ||
 		    !try_module_get(control->driver->owner)) {
 			icl->del_device(icl);
 			goto enodrv;