Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 142451
b: refs/heads/master
c: 868f985
h: refs/heads/master
i:
  142449: e61d6fa
  142447: 6d90a18
v: v3
  • Loading branch information
Hans Verkuil authored and Mauro Carvalho Chehab committed Apr 7, 2009
1 parent da04383 commit a0944b6
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: acebc70d4a789df21270690c70928b8a836caad7
refs/heads/master: 868f985c2fb85b5f32785bb55a349d180a30f3d3
11 changes: 11 additions & 0 deletions trunk/drivers/media/video/v4l2-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -864,6 +864,17 @@ struct v4l2_subdev *v4l2_i2c_new_probed_subdev(struct i2c_adapter *adapter,
}
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)
{
Expand Down
4 changes: 4 additions & 0 deletions trunk/include/media/v4l2-common.h
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,10 @@ struct v4l2_subdev *v4l2_i2c_new_subdev(struct i2c_adapter *adapter,
struct v4l2_subdev *v4l2_i2c_new_probed_subdev(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);
Expand Down

0 comments on commit a0944b6

Please sign in to comment.