]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
media: ov7670: use v4l2_async_unregister_subdev()
authorAkinobu Mita <akinobu.mita@gmail.com>
Fri, 24 Nov 2017 14:40:44 +0000 (09:40 -0500)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Fri, 8 Dec 2017 14:22:03 +0000 (09:22 -0500)
The sub-device for ov7670 is registered by v4l2_async_register_subdev().
So it should be unregistered by v4l2_async_unregister_subdev() instead of
v4l2_device_unregister_subdev().

Cc: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/i2c/ov7670.c

index 950a0acf85fb82214d3743e29596e0be1a031cc5..b61d88e7f3eb0d9d19b5757b11611a7b924ebd72 100644 (file)
@@ -1820,7 +1820,7 @@ static int ov7670_remove(struct i2c_client *client)
        struct v4l2_subdev *sd = i2c_get_clientdata(client);
        struct ov7670_info *info = to_state(sd);
 
-       v4l2_device_unregister_subdev(sd);
+       v4l2_async_unregister_subdev(sd);
        v4l2_ctrl_handler_free(&info->hdl);
        clk_disable_unprepare(info->clk);
 #if defined(CONFIG_MEDIA_CONTROLLER)