diff options
author | Lad, Prabhakar <prabhakar.csengg@gmail.com> | 2013-06-22 12:44:14 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2013-07-26 12:15:25 -0400 |
commit | 25ba2c802f0c675bc846cc5d0adcaba5b76e6c1f (patch) | |
tree | ec421f30ecadc2cbf01648a9b6f347b11594257b | |
parent | 6555cfc5e7f8080a76edc2f556c709770fc1db57 (diff) |
[media] media: i2c: tvp7002: add support for asynchronous probing
Both synchronous and asynchronous tvp7002 subdevice probing
is supported by this patch.
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
-rw-r--r-- | drivers/media/i2c/tvp7002.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/media/i2c/tvp7002.c b/drivers/media/i2c/tvp7002.c index a4e49483de6a..f6b1f3fe2608 100644 --- a/drivers/media/i2c/tvp7002.c +++ b/drivers/media/i2c/tvp7002.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/module.h> | 31 | #include <linux/module.h> |
32 | #include <linux/v4l2-dv-timings.h> | 32 | #include <linux/v4l2-dv-timings.h> |
33 | #include <media/tvp7002.h> | 33 | #include <media/tvp7002.h> |
34 | #include <media/v4l2-async.h> | ||
34 | #include <media/v4l2-device.h> | 35 | #include <media/v4l2-device.h> |
35 | #include <media/v4l2-common.h> | 36 | #include <media/v4l2-common.h> |
36 | #include <media/v4l2-ctrls.h> | 37 | #include <media/v4l2-ctrls.h> |
@@ -1039,6 +1040,10 @@ static int tvp7002_probe(struct i2c_client *c, const struct i2c_device_id *id) | |||
1039 | } | 1040 | } |
1040 | v4l2_ctrl_handler_setup(&device->hdl); | 1041 | v4l2_ctrl_handler_setup(&device->hdl); |
1041 | 1042 | ||
1043 | error = v4l2_async_register_subdev(&device->sd); | ||
1044 | if (error) | ||
1045 | goto error; | ||
1046 | |||
1042 | return 0; | 1047 | return 0; |
1043 | 1048 | ||
1044 | error: | 1049 | error: |
@@ -1063,6 +1068,7 @@ static int tvp7002_remove(struct i2c_client *c) | |||
1063 | 1068 | ||
1064 | v4l2_dbg(1, debug, sd, "Removing tvp7002 adapter" | 1069 | v4l2_dbg(1, debug, sd, "Removing tvp7002 adapter" |
1065 | "on address 0x%x\n", c->addr); | 1070 | "on address 0x%x\n", c->addr); |
1071 | v4l2_async_unregister_subdev(&device->sd); | ||
1066 | #if defined(CONFIG_MEDIA_CONTROLLER) | 1072 | #if defined(CONFIG_MEDIA_CONTROLLER) |
1067 | media_entity_cleanup(&device->sd.entity); | 1073 | media_entity_cleanup(&device->sd.entity); |
1068 | #endif | 1074 | #endif |