From: Akinobu Mita Date: Fri, 24 Nov 2017 14:40:44 +0000 (-0500) Subject: media: ov7670: use v4l2_async_unregister_subdev() X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=344aa836e813a6b097c23f2e0633dd17f62c2ed7;p=openwrt%2Fstaging%2Fblogic.git media: ov7670: use v4l2_async_unregister_subdev() 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 Signed-off-by: Akinobu Mita Reviewed-by: Kieran Bingham Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/i2c/ov7670.c b/drivers/media/i2c/ov7670.c index 950a0acf85fb..b61d88e7f3eb 100644 --- a/drivers/media/i2c/ov7670.c +++ b/drivers/media/i2c/ov7670.c @@ -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)