Return-path: Received: from mail-pl0-f66.google.com ([209.85.160.66]:35798 "EHLO mail-pl0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753693AbdKXOlJ (ORCPT ); Fri, 24 Nov 2017 09:41:09 -0500 Received: by mail-pl0-f66.google.com with SMTP id 62so4559460plc.2 for ; Fri, 24 Nov 2017 06:41:09 -0800 (PST) From: Akinobu Mita To: linux-media@vger.kernel.org Cc: Akinobu Mita , Jonathan Corbet , Sakari Ailus , Mauro Carvalho Chehab Subject: [PATCH] media: ov7670: use v4l2_async_unregister_subdev() Date: Fri, 24 Nov 2017 23:40:44 +0900 Message-Id: <1511534445-30512-1-git-send-email-akinobu.mita@gmail.com> Sender: linux-media-owner@vger.kernel.org List-ID: 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 Cc: Sakari Ailus Cc: Mauro Carvalho Chehab Signed-off-by: Akinobu Mita --- drivers/media/i2c/ov7670.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/i2c/ov7670.c b/drivers/media/i2c/ov7670.c index 950a0ac..b61d88e 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) -- 2.7.4