aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2009-04-01 02:57:53 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-04-06 20:44:24 -0400
commite6574f2fbecdb8af807169d345c10131ae060a88 (patch)
tree9923d1065397b9796a476cac238bacbdf1d820d1 /include
parent868f985c2fb85b5f32785bb55a349d180a30f3d3 (diff)
V4L/DVB (11373): v4l2-common: add explicit v4l2_device pointer as first arg to new_(probed)_subdev
The functions v4l2_i2c_new_subdev and v4l2_i2c_new_probed_subdev relied on i2c_get_adapdata to return the v4l2_device. However, this is not always possible on embedded platforms. So modify the API to pass the v4l2_device pointer explicitly. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/media/v4l2-common.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/media/v4l2-common.h b/include/media/v4l2-common.h
index 1613a0ab8b04..01302f19bc91 100644
--- a/include/media/v4l2-common.h
+++ b/include/media/v4l2-common.h
@@ -139,12 +139,14 @@ struct v4l2_subdev_ops;
139/* Load an i2c module and return an initialized v4l2_subdev struct. 139/* Load an i2c module and return an initialized v4l2_subdev struct.
140 Only call request_module if module_name != NULL. 140 Only call request_module if module_name != NULL.
141 The client_type argument is the name of the chip that's on the adapter. */ 141 The client_type argument is the name of the chip that's on the adapter. */
142struct v4l2_subdev *v4l2_i2c_new_subdev(struct i2c_adapter *adapter, 142struct v4l2_subdev *v4l2_i2c_new_subdev(struct v4l2_device *v4l2_dev,
143 struct i2c_adapter *adapter,
143 const char *module_name, const char *client_type, u8 addr); 144 const char *module_name, const char *client_type, u8 addr);
144/* Probe and load an i2c module and return an initialized v4l2_subdev struct. 145/* Probe and load an i2c module and return an initialized v4l2_subdev struct.
145 Only call request_module if module_name != NULL. 146 Only call request_module if module_name != NULL.
146 The client_type argument is the name of the chip that's on the adapter. */ 147 The client_type argument is the name of the chip that's on the adapter. */
147struct v4l2_subdev *v4l2_i2c_new_probed_subdev(struct i2c_adapter *adapter, 148struct v4l2_subdev *v4l2_i2c_new_probed_subdev(struct v4l2_device *v4l2_dev,
149 struct i2c_adapter *adapter,
148 const char *module_name, const char *client_type, 150 const char *module_name, const char *client_type,
149 const unsigned short *addrs); 151 const unsigned short *addrs);
150/* Like v4l2_i2c_new_probed_subdev, except probe for a single address. */ 152/* Like v4l2_i2c_new_probed_subdev, except probe for a single address. */