All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] em28xx-video: do not unregister the v4l2 dummy clock before v4l2_device_unregister() has been called
@ 2014-01-17 17:45 Frank Schäfer
  2014-01-17 17:45 ` [PATCH 2/3] em28xx-camera: fix return value checks on sensor probing Frank Schäfer
  2014-01-17 17:45 ` [PATCH 3/3] em28xx-v4l: do not call em28xx_init_camera() if the device has no sensor Frank Schäfer
  0 siblings, 2 replies; 3+ messages in thread
From: Frank Schäfer @ 2014-01-17 17:45 UTC (permalink / raw)
  To: m.chehab; +Cc: linux-media, Frank Schäfer

Otherwiese the core refuses to unregister the clock and the following warning
appears in the system log:

"WARNING: ... at drivers/media/v4l2-core/v4l2-clk.c:231 v4l2_clk_unregister+0x8a/0x90 [videodev]()
 v4l2_clk_unregister(): Refusing to unregister ref-counted 11-0030:mclk clock!"

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
---
 drivers/media/usb/em28xx/em28xx-video.c |    6 +++---
 1 Datei geändert, 3 Zeilen hinzugefügt(+), 3 Zeilen entfernt(-)

diff --git a/drivers/media/usb/em28xx/em28xx-video.c b/drivers/media/usb/em28xx/em28xx-video.c
index c3c9289..09e18da 100644
--- a/drivers/media/usb/em28xx/em28xx-video.c
+++ b/drivers/media/usb/em28xx/em28xx-video.c
@@ -1918,14 +1918,14 @@ static int em28xx_v4l2_fini(struct em28xx *dev)
 		video_unregister_device(dev->vdev);
 	}
 
+	v4l2_ctrl_handler_free(&dev->ctrl_handler);
+	v4l2_device_unregister(&dev->v4l2_dev);
+
 	if (dev->clk) {
 		v4l2_clk_unregister_fixed(dev->clk);
 		dev->clk = NULL;
 	}
 
-	v4l2_ctrl_handler_free(&dev->ctrl_handler);
-	v4l2_device_unregister(&dev->v4l2_dev);
-
 	if (dev->users)
 		em28xx_warn("Device is open ! Memory deallocation is deferred on last close.\n");
 	mutex_unlock(&dev->lock);
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-01-17 17:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-17 17:45 [PATCH 1/3] em28xx-video: do not unregister the v4l2 dummy clock before v4l2_device_unregister() has been called Frank Schäfer
2014-01-17 17:45 ` [PATCH 2/3] em28xx-camera: fix return value checks on sensor probing Frank Schäfer
2014-01-17 17:45 ` [PATCH 3/3] em28xx-v4l: do not call em28xx_init_camera() if the device has no sensor Frank Schäfer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.