diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2009-04-01 02:41:09 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-04-06 20:44:20 -0400 |
commit | 78a3b4db2e53a1903c86e2856e175d85a3849e84 (patch) | |
tree | c22153691d3ab5210bc02bdc478b29a938e85dc5 /drivers/media/video/v4l2-common.c | |
parent | b74c0aac357e5c71ee6de98b9887fe478bc73cf4 (diff) |
V4L/DVB (11367): v4l2-common: remove legacy code
Now that all drivers are converted to v4l2_subdev we can remove legacy code
in v4l2-common. Also move the documentation of the internal API to
v4l2-subdev.h where it really belongs.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/v4l2-common.c')
-rw-r--r-- | drivers/media/video/v4l2-common.c | 27 |
1 files changed, 1 insertions, 26 deletions
diff --git a/drivers/media/video/v4l2-common.c b/drivers/media/video/v4l2-common.c index 1da8cb836cb6..f23a77473aaf 100644 --- a/drivers/media/video/v4l2-common.c +++ b/drivers/media/video/v4l2-common.c | |||
@@ -739,33 +739,8 @@ EXPORT_SYMBOL(v4l2_chip_ident_i2c_client); | |||
739 | 739 | ||
740 | /* ----------------------------------------------------------------- */ | 740 | /* ----------------------------------------------------------------- */ |
741 | 741 | ||
742 | /* Helper function for I2C legacy drivers */ | 742 | /* I2C Helper functions */ |
743 | 743 | ||
744 | int v4l2_i2c_attach(struct i2c_adapter *adapter, int address, struct i2c_driver *driver, | ||
745 | const char *name, | ||
746 | int (*probe)(struct i2c_client *, const struct i2c_device_id *)) | ||
747 | { | ||
748 | struct i2c_client *client; | ||
749 | int err; | ||
750 | |||
751 | client = kzalloc(sizeof(struct i2c_client), GFP_KERNEL); | ||
752 | if (!client) | ||
753 | return -ENOMEM; | ||
754 | |||
755 | client->addr = address; | ||
756 | client->adapter = adapter; | ||
757 | client->driver = driver; | ||
758 | strlcpy(client->name, name, sizeof(client->name)); | ||
759 | |||
760 | err = probe(client, NULL); | ||
761 | if (err == 0) { | ||
762 | i2c_attach_client(client); | ||
763 | } else { | ||
764 | kfree(client); | ||
765 | } | ||
766 | return err != -ENOMEM ? 0 : err; | ||
767 | } | ||
768 | EXPORT_SYMBOL(v4l2_i2c_attach); | ||
769 | 744 | ||
770 | void v4l2_i2c_subdev_init(struct v4l2_subdev *sd, struct i2c_client *client, | 745 | void v4l2_i2c_subdev_init(struct v4l2_subdev *sd, struct i2c_client *client, |
771 | const struct v4l2_subdev_ops *ops) | 746 | const struct v4l2_subdev_ops *ops) |