linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Akinobu Mita <akinobu.mita@gmail.com>
To: linux-media@vger.kernel.org
Cc: Akinobu Mita <akinobu.mita@gmail.com>,
	Jonathan Corbet <corbet@lwn.net>,
	Mauro Carvalho Chehab <mchehab@s-opensource.com>
Subject: [PATCH 2/4] media: ov7670: use v4l2_async_unregister_subdev()
Date: Fri, 13 Oct 2017 01:21:15 +0900	[thread overview]
Message-ID: <1507825277-18364-3-git-send-email-akinobu.mita@gmail.com> (raw)
In-Reply-To: <1507825277-18364-1-git-send-email-akinobu.mita@gmail.com>

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>
Cc: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
---
 drivers/media/i2c/ov7670.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/media/i2c/ov7670.c b/drivers/media/i2c/ov7670.c
index d3f7d61..4f89a51 100644
--- a/drivers/media/i2c/ov7670.c
+++ b/drivers/media/i2c/ov7670.c
@@ -19,6 +19,7 @@
 #include <linux/videodev2.h>
 #include <linux/gpio.h>
 #include <linux/gpio/consumer.h>
+#include <media/v4l2-async.h>
 #include <media/v4l2-device.h>
 #include <media/v4l2-ctrls.h>
 #include <media/v4l2-mediabus.h>
@@ -1710,7 +1711,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);
 	return 0;
-- 
2.7.4

  parent reply	other threads:[~2017-10-12 16:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-12 16:21 [PATCH 0/4] media: ov7670: add media controller support Akinobu Mita
2017-10-12 16:21 ` [PATCH 1/4] media: ov7670: create subdevice device node Akinobu Mita
2017-10-12 16:21 ` Akinobu Mita [this message]
2017-10-12 16:21 ` [PATCH 3/4] media: ov7670: add media controller support Akinobu Mita
2017-10-12 16:21 ` [PATCH 4/4] media: ov7670: add get_fmt() pad ops callback Akinobu Mita
2017-10-13 20:48 ` [PATCH 0/4] media: ov7670: add media controller support Sakari Ailus
2017-10-16  3:11   ` Yang, Wenyou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1507825277-18364-3-git-send-email-akinobu.mita@gmail.com \
    --to=akinobu.mita@gmail.com \
    --cc=corbet@lwn.net \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@s-opensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).