upstream: [media] em28xx: print a message at disconnect
authorMauro Carvalho Chehab <m.chehab@samsung.com>
Sun, 12 Jan 2014 22:22:07 +0000 (19:22 -0300)
committerChanho Park <chanho61.park@samsung.com>
Tue, 18 Nov 2014 02:54:31 +0000 (11:54 +0900)
That helps to identify if something fails and explain why em28xx
struct is not freed (if it ever happens).

Reviewed-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Tested-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/usb/em28xx/em28xx-audio.c
drivers/media/usb/em28xx/em28xx-dvb.c
drivers/media/usb/em28xx/em28xx-input.c
drivers/media/usb/em28xx/em28xx-video.c

index 7f762db..26cf431 100644 (file)
@@ -956,6 +956,8 @@ static int em28xx_audio_fini(struct em28xx *dev)
                return 0;
        }
 
+       em28xx_info("Closing audio extension");
+
        snd_card_disconnect(dev->adev.sndcard);
        em28xx_audio_free_urb(dev);
 
index 4f23b09..740806a 100644 (file)
@@ -1381,6 +1381,8 @@ static int em28xx_dvb_fini(struct em28xx *dev)
                return 0;
        }
 
+       em28xx_info("Closing DVB extension");
+
        if (dev->dvb) {
                struct em28xx_dvb *dvb = dev->dvb;
 
index 61c061f..18f65d8 100644 (file)
@@ -810,6 +810,8 @@ static int em28xx_ir_fini(struct em28xx *dev)
                return 0;
        }
 
+       em28xx_info("Closing input extension");
+
        em28xx_shutdown_buttons(dev);
 
        /* skip detach on non attached boards */
index a6aba61..5538b78 100644 (file)
@@ -1899,6 +1899,8 @@ static int em28xx_v4l2_fini(struct em28xx *dev)
                return 0;
        }
 
+       em28xx_info("Closing video extension");
+
        v4l2_device_disconnect(&dev->v4l2_dev);
 
        em28xx_uninit_usb_xfer(dev, EM28XX_ANALOG_MODE);