summaryrefslogtreecommitdiff
path: root/linux/include
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2009-04-01 08:57:53 +0200
committerHans Verkuil <hverkuil@xs4all.nl>2009-04-01 08:57:53 +0200
commitf0312f1d7b8dd5cde4035eef2a5b0fe7effdd838 (patch)
tree3e4f7547293379c0876008a04da98af9ba4f47aa /linux/include
parent1784ea5527ed756f946958f45f74d1f15797c366 (diff)
downloadmediapointer-dvb-s2-f0312f1d7b8dd5cde4035eef2a5b0fe7effdd838.tar.gz
mediapointer-dvb-s2-f0312f1d7b8dd5cde4035eef2a5b0fe7effdd838.tar.bz2
v4l2-common: add explicit v4l2_device pointer as first arg to new_(probed)_subdev
From: Hans Verkuil <hverkuil@xs4all.nl> 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. Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Diffstat (limited to 'linux/include')
-rw-r--r--linux/include/media/v4l2-common.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/linux/include/media/v4l2-common.h b/linux/include/media/v4l2-common.h
index 8c534d476..665414d09 100644
--- a/linux/include/media/v4l2-common.h
+++ b/linux/include/media/v4l2-common.h
@@ -144,12 +144,14 @@ int v4l2_i2c_attach(struct i2c_adapter *adapter, int address, struct i2c_driver
/* Load an i2c module and return an initialized v4l2_subdev struct.
Only call request_module if module_name != NULL.
The client_type argument is the name of the chip that's on the adapter. */
-struct v4l2_subdev *v4l2_i2c_new_subdev(struct i2c_adapter *adapter,
+struct v4l2_subdev *v4l2_i2c_new_subdev(struct v4l2_device *v4l2_dev,
+ struct i2c_adapter *adapter,
const char *module_name, const char *client_type, u8 addr);
/* Probe and load an i2c module and return an initialized v4l2_subdev struct.
Only call request_module if module_name != NULL.
The client_type argument is the name of the chip that's on the adapter. */
-struct v4l2_subdev *v4l2_i2c_new_probed_subdev(struct i2c_adapter *adapter,
+struct v4l2_subdev *v4l2_i2c_new_probed_subdev(struct v4l2_device *v4l2_dev,
+ struct i2c_adapter *adapter,
const char *module_name, const char *client_type,
const unsigned short *addrs);
/* Initialize an v4l2_subdev with data from an i2c_client struct */