aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2013-11-25 14:18:02 -0500
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-05-25 11:50:10 -0400
commitbedc3939dc866e0bf2648ca3700119bf6c3e54de (patch)
tree73a5b6c19d12de1ca4f12b447d3e85086136d8bf
parente5e749dfa8606343fd7956868038bdde2e656ec1 (diff)
[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>
-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,
2333 goto err_entity; 2333 goto err_entity;
2334 v4l2_info(sd, "%s found @ 0x%x (%s)\n", client->name, 2334 v4l2_info(sd, "%s found @ 0x%x (%s)\n", client->name,
2335 client->addr << 1, client->adapter->name); 2335 client->addr << 1, client->adapter->name);
2336
2337 err = v4l2_async_register_subdev(sd);
2338 if (err)
2339 goto err_entity;
2340
2336 return 0; 2341 return 0;
2337 2342
2338err_entity: 2343err_entity:
@@ -2356,6 +2361,7 @@ static int adv7604_remove(struct i2c_client *client)
2356 2361
2357 cancel_delayed_work(&state->delayed_work_enable_hotplug); 2362 cancel_delayed_work(&state->delayed_work_enable_hotplug);
2358 destroy_workqueue(state->work_queues); 2363 destroy_workqueue(state->work_queues);
2364 v4l2_async_unregister_subdev(sd);
2359 v4l2_device_unregister_subdev(sd); 2365 v4l2_device_unregister_subdev(sd);
2360 media_entity_cleanup(&sd->entity); 2366 media_entity_cleanup(&sd->entity);
2361 adv7604_unregister_clients(to_state(sd)); 2367 adv7604_unregister_clients(to_state(sd));