diff options
author | Frank Schaefer <fschaefer.oss@googlemail.com> | 2014-01-17 12:45:30 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-02-04 13:40:26 -0500 |
commit | 103f18a27d06839f07a62f923feeee2d71bf2909 (patch) | |
tree | 8334f98c878ddd2a812294a7e64485a171c9a992 /drivers/media/usb/em28xx/em28xx-video.c | |
parent | 01ae3b51af7144ea29eb28ba718b65ad59ab9493 (diff) |
[media] em28xx-video: do not unregister the v4l2 dummy clock before v4l2_device_unregister() has been called
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>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media/usb/em28xx/em28xx-video.c')
-rw-r--r-- | drivers/media/usb/em28xx/em28xx-video.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/media/usb/em28xx/em28xx-video.c b/drivers/media/usb/em28xx/em28xx-video.c index c3c928937dcd..09e18da0b5cd 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) | |||
1918 | video_unregister_device(dev->vdev); | 1918 | video_unregister_device(dev->vdev); |
1919 | } | 1919 | } |
1920 | 1920 | ||
1921 | v4l2_ctrl_handler_free(&dev->ctrl_handler); | ||
1922 | v4l2_device_unregister(&dev->v4l2_dev); | ||
1923 | |||
1921 | if (dev->clk) { | 1924 | if (dev->clk) { |
1922 | v4l2_clk_unregister_fixed(dev->clk); | 1925 | v4l2_clk_unregister_fixed(dev->clk); |
1923 | dev->clk = NULL; | 1926 | dev->clk = NULL; |
1924 | } | 1927 | } |
1925 | 1928 | ||
1926 | v4l2_ctrl_handler_free(&dev->ctrl_handler); | ||
1927 | v4l2_device_unregister(&dev->v4l2_dev); | ||
1928 | |||
1929 | if (dev->users) | 1929 | if (dev->users) |
1930 | em28xx_warn("Device is open ! Memory deallocation is deferred on last close.\n"); | 1930 | em28xx_warn("Device is open ! Memory deallocation is deferred on last close.\n"); |
1931 | mutex_unlock(&dev->lock); | 1931 | mutex_unlock(&dev->lock); |