summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/ov6650.c
diff options
context:
space:
mode:
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>2011-09-09 18:39:20 +0200
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-11-03 21:29:03 +0100
commit2f0babb7e43278247df512263581c4738afa4cbc (patch)
treeb09a18f6f7756c9f793e36c26db17f4cfc9a558e /drivers/media/video/ov6650.c
parent[media] V4L: add .g_std() core V4L2 subdevice operation (diff)
downloadlinux-2f0babb7e43278247df512263581c4738afa4cbc.tar.xz
linux-2f0babb7e43278247df512263581c4738afa4cbc.zip
[media] V4L: soc-camera: make (almost) all client drivers re-usable outside of the framework
The most important change in this patch is direct linking to struct soc_camera_link via the client->dev.platform_data pointer. This makes most of the soc-camera client drivers also usable outside of the soc-camera framework. After this change all what is needed for these drivers to function are inclusions of soc-camera headers for some convenience macros, suitably configured platform data, which is anyway always required, and loaded soc-camera core module for library functions. If desired, these library functions can be made generic in the future and moved to a more neutral location. The only two client drivers, that still depend on soc-camera are: mt9t031: it uses struct video_device for its PM. Since no hardware is available, alternative methods cannot be tested. ov6650: it uses struct soc_camera_device to pass its sense data back to the bridge driver. A generic v4l2-subdevice approach should be developed to perform this. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/ov6650.c')
-rw-r--r--drivers/media/video/ov6650.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/video/ov6650.c b/drivers/media/video/ov6650.c
index f060eaaf916f..eb296f9e69f4 100644
--- a/drivers/media/video/ov6650.c
+++ b/drivers/media/video/ov6650.c
@@ -541,7 +541,7 @@ static u8 to_clkrc(struct v4l2_fract *timeperframe,
static int ov6650_s_fmt(struct v4l2_subdev *sd, struct v4l2_mbus_framefmt *mf)
{
struct i2c_client *client = v4l2_get_subdevdata(sd);
- struct soc_camera_device *icd = client->dev.platform_data;
+ struct soc_camera_device *icd = (struct soc_camera_device *)sd->grp_id;
struct soc_camera_sense *sense = icd->sense;
struct ov6650 *priv = to_ov6650(client);
bool half_scale = !is_unscaled_ok(mf->width, mf->height, &priv->rect);