The patch number 11374 was added via Hans Verkuil <hverk...@xs4all.nl> to http://linuxtv.org/hg/v4l-dvb master development tree.
Kernel patches in this development tree may be modified to be backward compatible with older kernels. Compatibility modifications will be removed before inclusion into the mainstream Kernel If anyone has any objections, please let us know by sending a message to: Linux Media Mailing List <linux-me...@vger.kernel.org> ------ From: Hans Verkuil <hverk...@xs4all.nl> v4l2-common: add v4l2_i2c_new_probed_subdev_addr Add utility function to probe for a single address, rather than a list of addresses. Priority: normal Signed-off-by: Hans Verkuil <hverk...@xs4all.nl> --- linux/drivers/media/video/v4l2-common.c | 11 +++++++++++ linux/include/media/v4l2-common.h | 4 ++++ 2 files changed, 15 insertions(+) diff -r 102cf93458d0 -r 0b94aa323eb1 linux/drivers/media/video/v4l2-common.c --- a/linux/drivers/media/video/v4l2-common.c Wed Apr 01 08:57:53 2009 +0200 +++ b/linux/drivers/media/video/v4l2-common.c Mon Mar 30 16:40:54 2009 +0200 @@ -941,6 +941,17 @@ error: } EXPORT_SYMBOL_GPL(v4l2_i2c_new_probed_subdev); +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) +{ + unsigned short addrs[2] = { addr, I2C_CLIENT_END }; + + return v4l2_i2c_new_probed_subdev(v4l2_dev, adapter, + module_name, client_type, addrs); +} +EXPORT_SYMBOL_GPL(v4l2_i2c_new_probed_subdev_addr); + /* Return i2c client address of v4l2_subdev. */ unsigned short v4l2_i2c_subdev_addr(struct v4l2_subdev *sd) { diff -r 102cf93458d0 -r 0b94aa323eb1 linux/include/media/v4l2-common.h --- a/linux/include/media/v4l2-common.h Wed Apr 01 08:57:53 2009 +0200 +++ b/linux/include/media/v4l2-common.h Mon Mar 30 16:40:54 2009 +0200 @@ -154,6 +154,10 @@ struct v4l2_subdev *v4l2_i2c_new_probed_ 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); /* Initialize an v4l2_subdev with data from an i2c_client struct */ void v4l2_i2c_subdev_init(struct v4l2_subdev *sd, struct i2c_client *client, const struct v4l2_subdev_ops *ops); --- Patch is available at: http://linuxtv.org/hg/v4l-dvb/rev/0b94aa323eb184fbb0c67e6ede370ef8e5e9d198 _______________________________________________ linuxtv-commits mailing list linuxtv-commits@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits