2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-25 05:34:00 +08:00

[media] em28xx: move usb transfer uninit on device disconnect from the core to the v4l-extension

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
This commit is contained in:
Frank Schaefer 2014-01-12 13:24:20 -03:00 committed by Mauro Carvalho Chehab
parent 27ba0dac2d
commit 23e8642cc4
2 changed files with 3 additions and 3 deletions

View File

@ -3391,12 +3391,10 @@ static void em28xx_usb_disconnect(struct usb_interface *interface)
v4l2_device_disconnect(&dev->v4l2_dev);
if (dev->users) {
if (dev->users)
em28xx_warn("device %s is open! Deregistration and memory deallocation are deferred on close.\n",
video_device_node_name(dev->vdev));
em28xx_uninit_usb_xfer(dev, EM28XX_ANALOG_MODE);
}
mutex_unlock(&dev->lock);
em28xx_close_extension(dev);

View File

@ -1893,6 +1893,8 @@ static int em28xx_v4l2_fini(struct em28xx *dev)
return 0;
}
em28xx_uninit_usb_xfer(dev, EM28XX_ANALOG_MODE);
if (dev->radio_dev) {
if (video_is_registered(dev->radio_dev))
video_unregister_device(dev->radio_dev);