summaryrefslogtreecommitdiff
path: root/drivers/media
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2013-11-25 23:18:02 +0400
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-05-25 19:50:10 +0400
commitbedc3939dc866e0bf2648ca3700119bf6c3e54de (patch)
tree73a5b6c19d12de1ca4f12b447d3e85086136d8bf /drivers/media
parente5e749dfa8606343fd7956868038bdde2e656ec1 (diff)
downloadlinux-bedc3939dc866e0bf2648ca3700119bf6c3e54de.tar.xz
[media] adv7604: Add support for asynchronous probing
Register the device with the v4l2 asynchronous probing framework to support asynchronous instantiation systems such as DT. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/i2c/adv7604.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/media/i2c/adv7604.c b/drivers/media/i2c/adv7604.c
index 338baa4c23ef..7358853bf092 100644
--- a/drivers/media/i2c/adv7604.c
+++ b/drivers/media/i2c/adv7604.c
@@ -2333,6 +2333,11 @@ static int adv7604_probe(struct i2c_client *client,
goto err_entity;
v4l2_info(sd, "%s found @ 0x%x (%s)\n", client->name,
client->addr << 1, client->adapter->name);
+
+ err = v4l2_async_register_subdev(sd);
+ if (err)
+ goto err_entity;
+
return 0;
err_entity:
@@ -2356,6 +2361,7 @@ static int adv7604_remove(struct i2c_client *client)
cancel_delayed_work(&state->delayed_work_enable_hotplug);
destroy_workqueue(state->work_queues);
+ v4l2_async_unregister_subdev(sd);
v4l2_device_unregister_subdev(sd);
media_entity_cleanup(&sd->entity);
adv7604_unregister_clients(to_state(sd));