m5mols: add async subdev registration
authorAndrzej Hajda <a.hajda@samsung.com>
Wed, 4 Sep 2013 06:31:48 +0000 (08:31 +0200)
committerChanho Park <chanho61.park@samsung.com>
Tue, 18 Nov 2014 02:44:38 +0000 (11:44 +0900)
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
drivers/media/i2c/m5mols/m5mols_core.c

index c0d3551..ad83a43 100644 (file)
@@ -1067,6 +1067,10 @@ static int m5mols_probe(struct i2c_client *client,
        if (ret < 0)
                goto error;
 
+       ret = v4l2_async_register_subdev(&info->sd);
+       if (ret < 0)
+               goto error;
+
        return 0;
 error:
        media_entity_cleanup(&sd->entity);
@@ -1077,6 +1081,8 @@ static int m5mols_remove(struct i2c_client *client)
 {
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
 
+       v4l2_async_unregister_subdev(sd);
+
        v4l2_device_unregister_subdev(sd);
        v4l2_ctrl_handler_free(sd->ctrl_handler);
        media_entity_cleanup(&sd->entity);