diff options
author | Guennadi Liakhovetski <g.liakhovetski@gmx.de> | 2011-07-16 01:03:38 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-07-27 22:56:08 +0200 |
commit | 7dfff95366f48bf66f77c17cdc9ebd8be696ac5d (patch) | |
tree | c4cb975f5b8b8c3008921d38fa6e4deed9c8dbc9 /include/media/soc_camera.h | |
parent | [media] V4L: soc-camera: un-export the soc-camera bus (diff) | |
download | linux-7dfff95366f48bf66f77c17cdc9ebd8be696ac5d.tar.xz linux-7dfff95366f48bf66f77c17cdc9ebd8be696ac5d.zip |
[media] V4L: soc-camera: remove soc-camera bus and devices on it
Now that v4l2 subdevices have got their own device objects, having
one more device in soc-camera clients became redundant and confusing.
This patch removes those devices and the soc-camera bus, they used to
reside on.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'include/media/soc_camera.h')
-rw-r--r-- | include/media/soc_camera.h | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/include/media/soc_camera.h b/include/media/soc_camera.h index c31d55be3e17..7582952dceae 100644 --- a/include/media/soc_camera.h +++ b/include/media/soc_camera.h @@ -21,11 +21,14 @@ #include <media/v4l2-device.h> struct file; +struct soc_camera_link; struct soc_camera_device { struct list_head list; /* list of all registered devices */ - struct device dev; + struct soc_camera_link *link; struct device *pdev; /* Platform device */ + struct device *parent; /* Camera host device */ + struct device *control; /* E.g., the i2c client */ s32 user_width; s32 user_height; u32 bytesperline; /* for padding, zero if unused */ @@ -127,8 +130,8 @@ struct soc_camera_link { * For non-I2C devices platform has to provide methods to add a device * to the system and to remove it */ - int (*add_device)(struct soc_camera_link *, struct device *); - void (*del_device)(struct soc_camera_link *); + int (*add_device)(struct soc_camera_device *); + void (*del_device)(struct soc_camera_device *); /* Optional callbacks to power on or off and reset the sensor */ int (*power)(struct device *, int); int (*reset)(struct device *); @@ -142,12 +145,6 @@ struct soc_camera_link { void (*free_bus)(struct soc_camera_link *); }; -static inline struct soc_camera_device *to_soc_camera_dev( - const struct device *dev) -{ - return container_of(dev, struct soc_camera_device, dev); -} - static inline struct soc_camera_host *to_soc_camera_host( const struct device *dev) { @@ -159,13 +156,13 @@ static inline struct soc_camera_host *to_soc_camera_host( static inline struct soc_camera_link *to_soc_camera_link( const struct soc_camera_device *icd) { - return icd->dev.platform_data; + return icd->link; } static inline struct device *to_soc_camera_control( const struct soc_camera_device *icd) { - return dev_get_drvdata(&icd->dev); + return icd->control; } static inline struct v4l2_subdev *soc_camera_to_subdev( |