diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2009-08-10 07:49:08 +0200 |
---|---|---|
committer | Hans Verkuil <hverkuil@xs4all.nl> | 2009-08-10 07:49:08 +0200 |
commit | 78b537e32fbc1e45a9d5fe1086c4e6c303661e53 (patch) | |
tree | 132abee06a31e1259fa5e8de9d895897dd7a12c8 /linux/include/media | |
parent | 731b07aacdb288bdc2e0d55090224470c064cac0 (diff) | |
download | mediapointer-dvb-s2-78b537e32fbc1e45a9d5fe1086c4e6c303661e53.tar.gz mediapointer-dvb-s2-78b537e32fbc1e45a9d5fe1086c4e6c303661e53.tar.bz2 |
v4l: simplify v4l2_i2c_new_subdev and friends
From: Hans Verkuil <hverkuil@xs4all.nl>
Rewrite v4l2_i2c_new_subdev as a simplified version of v4l2_i2c_new_subdev_cfg
and remove v4l2_i2c_new_probed_subdev and v4l2_i2c_new_probed_subdev_addr.
This simplifies this API substantially.
Priority: normal
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Diffstat (limited to 'linux/include/media')
-rw-r--r-- | linux/include/media/v4l2-common.h | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/linux/include/media/v4l2-common.h b/linux/include/media/v4l2-common.h index 831c4c038..5a5d927af 100644 --- a/linux/include/media/v4l2-common.h +++ b/linux/include/media/v4l2-common.h @@ -144,29 +144,23 @@ 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 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 v4l2_device *v4l2_dev, +struct v4l2_subdev *v4l2_i2c_new_subdev_cfg(struct v4l2_device *v4l2_dev, struct i2c_adapter *adapter, const char *module_name, const char *client_type, - const unsigned short *addrs); -/* Like v4l2_i2c_new_probed_subdev, except probe for a single address. */ -struct v4l2_subdev *v4l2_i2c_new_probed_subdev_addr(struct v4l2_device *v4l2_dev, - struct i2c_adapter *adapter, - const char *module_name, const char *client_type, u8 addr); + int irq, void *platform_data, + u8 addr, const unsigned short *probe_addrs); /* 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_cfg(struct v4l2_device *v4l2_dev, +static inline struct v4l2_subdev *v4l2_i2c_new_subdev(struct v4l2_device *v4l2_dev, struct i2c_adapter *adapter, const char *module_name, const char *client_type, - int irq, void *platform_data, - u8 addr, const unsigned short *probe_addrs); + u8 addr, const unsigned short *probe_addrs) +{ + return v4l2_i2c_new_subdev_cfg(v4l2_dev, adapter, module_name, + client_type, 0, NULL, addr, probe_addrs); +} #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26) struct i2c_board_info; |