linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hans Verkuil <hverkuil-cisco@xs4all.nl>
To: linux-media@vger.kernel.org
Cc: Jonathan Corbet <corbet@lwn.net>,
	Hans Verkuil <hverkuil-cisco@xs4all.nl>
Subject: [PATCH 1/4] via-camera: call viafb_pm_unregister in remove()
Date: Wed, 17 Jul 2019 11:03:42 +0200	[thread overview]
Message-ID: <20190717090345.26521-2-hverkuil-cisco@xs4all.nl> (raw)
In-Reply-To: <20190717090345.26521-1-hverkuil-cisco@xs4all.nl>

The power management hooks were never unregistered, which caused a
crash when unloading the module.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
---
 drivers/media/platform/via-camera.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/media/platform/via-camera.c b/drivers/media/platform/via-camera.c
index 24d5759501a5..f9016c2ee70d 100644
--- a/drivers/media/platform/via-camera.c
+++ b/drivers/media/platform/via-camera.c
@@ -1464,6 +1464,9 @@ static int viacam_remove(struct platform_device *pdev)
 
 	video_unregister_device(&cam->vdev);
 	v4l2_device_unregister(&cam->v4l2_dev);
+#ifdef CONFIG_PM
+	viafb_pm_unregister(&viacam_pm_hooks);
+#endif
 	free_irq(viadev->pdev->irq, cam);
 	via_sensor_power_release(cam);
 	v4l2_ctrl_handler_free(&cam->ctrl_handler);
-- 
2.20.1


  reply	other threads:[~2019-07-17  9:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-17  9:03 [PATCH 0/4] via-camera/ov7670: various fixes/improvements Hans Verkuil
2019-07-17  9:03 ` Hans Verkuil [this message]
2019-07-17  9:03 ` [PATCH 2/4] via-camera: use struct v4l2_fh Hans Verkuil
2019-07-21 14:30   ` Ezequiel Garcia
2019-07-17  9:03 ` [PATCH 3/4] ov7670: don't return ENOTTY if SUBDEV_API is not set Hans Verkuil
2019-07-17  9:03 ` [PATCH 4/4] via-camera: fix v4l2-compliance fails Hans Verkuil

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=20190717090345.26521-2-hverkuil-cisco@xs4all.nl \
    --to=hverkuil-cisco@xs4all.nl \
    --cc=corbet@lwn.net \
    --cc=linux-media@vger.kernel.org \
    --subject='Re: [PATCH 1/4] via-camera: call viafb_pm_unregister in remove()' \
    /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

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).