diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2009-03-30 16:40:54 +0200 |
---|---|---|
committer | Hans Verkuil <hverkuil@xs4all.nl> | 2009-03-30 16:40:54 +0200 |
commit | 402941a820682bd6f89f6705bbe643e6808facc5 (patch) | |
tree | e4c6e5a8f78d6fb76a7b6feceb877d98c7b25394 /linux/drivers | |
parent | f0312f1d7b8dd5cde4035eef2a5b0fe7effdd838 (diff) | |
download | mediapointer-dvb-s2-402941a820682bd6f89f6705bbe643e6808facc5.tar.gz mediapointer-dvb-s2-402941a820682bd6f89f6705bbe643e6808facc5.tar.bz2 |
v4l2-common: add v4l2_i2c_new_probed_subdev_addr
From: Hans Verkuil <hverkuil@xs4all.nl>
Add utility function to probe for a single address, rather than a list
of addresses.
Priority: normal
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Diffstat (limited to 'linux/drivers')
-rw-r--r-- | linux/drivers/media/video/v4l2-common.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/linux/drivers/media/video/v4l2-common.c b/linux/drivers/media/video/v4l2-common.c index d6f41f8af..d75d89c88 100644 --- a/linux/drivers/media/video/v4l2-common.c +++ b/linux/drivers/media/video/v4l2-common.c @@ -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) { |