[media] au0828: postpone call to au0828_unregister_media_device()
authorMauro Carvalho Chehab <mchehab@osg.samsung.com>
Thu, 10 Dec 2015 12:58:04 +0000 (10:58 -0200)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Mon, 11 Jan 2016 14:18:56 +0000 (12:18 -0200)
The DVB core needs to unregister the media device. So, we
can't call au0828_unregister_media_device() before calling
au0828_dvb_unregister(), otherwise the DVB MC free code
(that will be implemented on the next patch) will fail.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/usb/au0828/au0828-core.c

index ee20f4354ba26a485e7280eb20d434c69a4f81ac..e7ebb5e638be51a0f886520b6310664aa30fe753 100644 (file)
@@ -178,8 +178,6 @@ static void au0828_usb_disconnect(struct usb_interface *interface)
        */
        dev->dev_state = DEV_DISCONNECTED;
 
-       au0828_unregister_media_device(dev);
-
        au0828_rc_unregister(dev);
        /* Digital TV */
        au0828_dvb_unregister(dev);
@@ -193,6 +191,10 @@ static void au0828_usb_disconnect(struct usb_interface *interface)
                au0828_analog_unregister(dev);
                v4l2_device_disconnect(&dev->v4l2_dev);
                v4l2_device_put(&dev->v4l2_dev);
+               /*
+                * No need to call au0828_usb_release() if V4L2 is enabled,
+                * as this is already called via au0828_usb_v4l2_release()
+                */
                return;
        }
 #endif
This page took 0.044925 seconds and 5 git commands to generate.