Skip to contentSkip to conversation

adv7180: use async subdev registration

PATCH In review Ben Dooks 1 participant 1 message Apr 14, 2014

Subsystems (3)
lore
Share & tools
lore

Ben Dooks

author
#0 lore raw

PATCH v3 1/7 adv7180: use async subdev registration

Change to using the the async subdev registration API so that when soc_camera is using OF to find devices this can be found and attached.

---
 drivers/media/i2c/adv7180.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
drivers/media/i2c/adv7180.c +7 -1
index d7d99f1..215afa0 100644
@@ -29,6 +29,7 @@
 #include <linux/videodev2.h>
 #include <media/v4l2-device.h>
 #include <media/v4l2-ctrls.h>
+#include <media/v4l2-async.h>
 #include <linux/mutex.h>
 
 #define ADV7180_INPUT_CONTROL_REG			0x00
@@ -611,6 +612,11 @@ static int adv7180_probe(struct i2c_client *client,
 	ret = init_device(client, state);
 	if (ret)
 		goto err_free_ctrl;
+
+	ret = v4l2_async_register_subdev(sd);
+	if (ret)
+		goto err_free_ctrl;
+
 	return 0;
 
 err_free_ctrl:
@@ -641,7 +647,7 @@ static int adv7180_remove(struct i2c_client *client)
 	}
 
 	mutex_destroy(&state->mutex);
-	v4l2_device_unregister_subdev(sd);
+	v4l2_async_unregister_subdev(sd);
 	return 0;
 }
 
Signature · 1 line
1.9.1