summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLad, Prabhakar <prabhakar.csengg@gmail.com>2013-06-22 16:44:14 (GMT)
committerMauro Carvalho Chehab <m.chehab@samsung.com>2013-07-26 16:15:25 (GMT)
commit25ba2c802f0c675bc846cc5d0adcaba5b76e6c1f (patch)
treeec421f30ecadc2cbf01648a9b6f347b11594257b
parent6555cfc5e7f8080a76edc2f556c709770fc1db57 (diff)
downloadlinux-fsl-qoriq-25ba2c802f0c675bc846cc5d0adcaba5b76e6c1f.tar.xz
[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.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/media/i2c/tvp7002.c b/drivers/media/i2c/tvp7002.c
index a4e4948..f6b1f3f 100644
--- a/drivers/media/i2c/tvp7002.c
+++ b/drivers/media/i2c/tvp7002.c
@@ -31,6 +31,7 @@
#include <linux/module.h>
#include <linux/v4l2-dv-timings.h>
#include <media/tvp7002.h>
+#include <media/v4l2-async.h>
#include <media/v4l2-device.h>
#include <media/v4l2-common.h>
#include <media/v4l2-ctrls.h>
@@ -1039,6 +1040,10 @@ static int tvp7002_probe(struct i2c_client *c, const struct i2c_device_id *id)
}
v4l2_ctrl_handler_setup(&device->hdl);
+ error = v4l2_async_register_subdev(&device->sd);
+ if (error)
+ goto error;
+
return 0;
error:
@@ -1063,6 +1068,7 @@ static int tvp7002_remove(struct i2c_client *c)
v4l2_dbg(1, debug, sd, "Removing tvp7002 adapter"
"on address 0x%x\n", c->addr);
+ v4l2_async_unregister_subdev(&device->sd);
#if defined(CONFIG_MEDIA_CONTROLLER)
media_entity_cleanup(&device->sd.entity);
#endif