aboutsummaryrefslogtreecommitdiffstats
path: root/include/media/soc_camera.h
diff options
context:
space:
mode:
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>2011-07-15 19:03:38 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-07-27 16:56:08 -0400
commit7dfff95366f48bf66f77c17cdc9ebd8be696ac5d (patch)
treec4cb975f5b8b8c3008921d38fa6e4deed9c8dbc9 /include/media/soc_camera.h
parentd33b290a149dafe2e3cc2901ec726bea09a2c0f4 (diff)
[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.h19
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 @@
21#include <media/v4l2-device.h> 21#include <media/v4l2-device.h>
22 22
23struct file; 23struct file;
24struct soc_camera_link;
24 25
25struct soc_camera_device { 26struct soc_camera_device {
26 struct list_head list; /* list of all registered devices */ 27 struct list_head list; /* list of all registered devices */
27 struct device dev; 28 struct soc_camera_link *link;
28 struct device *pdev; /* Platform device */ 29 struct device *pdev; /* Platform device */
30 struct device *parent; /* Camera host device */
31 struct device *control; /* E.g., the i2c client */
29 s32 user_width; 32 s32 user_width;
30 s32 user_height; 33 s32 user_height;
31 u32 bytesperline; /* for padding, zero if unused */ 34 u32 bytesperline; /* for padding, zero if unused */
@@ -127,8 +130,8 @@ struct soc_camera_link {
127 * For non-I2C devices platform has to provide methods to add a device 130 * For non-I2C devices platform has to provide methods to add a device
128 * to the system and to remove it 131 * to the system and to remove it
129 */ 132 */
130 int (*add_device)(struct soc_camera_link *, struct device *); 133 int (*add_device)(struct soc_camera_device *);
131 void (*del_device)(struct soc_camera_link *); 134 void (*del_device)(struct soc_camera_device *);
132 /* Optional callbacks to power on or off and reset the sensor */ 135 /* Optional callbacks to power on or off and reset the sensor */
133 int (*power)(struct device *, int); 136 int (*power)(struct device *, int);
134 int (*reset)(struct device *); 137 int (*reset)(struct device *);
@@ -142,12 +145,6 @@ struct soc_camera_link {
142 void (*free_bus)(struct soc_camera_link *); 145 void (*free_bus)(struct soc_camera_link *);
143}; 146};
144 147
145static inline struct soc_camera_device *to_soc_camera_dev(
146 const struct device *dev)
147{
148 return container_of(dev, struct soc_camera_device, dev);
149}
150
151static inline struct soc_camera_host *to_soc_camera_host( 148static inline struct soc_camera_host *to_soc_camera_host(
152 const struct device *dev) 149 const struct device *dev)
153{ 150{
@@ -159,13 +156,13 @@ static inline struct soc_camera_host *to_soc_camera_host(
159static inline struct soc_camera_link *to_soc_camera_link( 156static inline struct soc_camera_link *to_soc_camera_link(
160 const struct soc_camera_device *icd) 157 const struct soc_camera_device *icd)
161{ 158{
162 return icd->dev.platform_data; 159 return icd->link;
163} 160}
164 161
165static inline struct device *to_soc_camera_control( 162static inline struct device *to_soc_camera_control(
166 const struct soc_camera_device *icd) 163 const struct soc_camera_device *icd)
167{ 164{
168 return dev_get_drvdata(&icd->dev); 165 return icd->control;
169} 166}
170 167
171static inline struct v4l2_subdev *soc_camera_to_subdev( 168static inline struct v4l2_subdev *soc_camera_to_subdev(