V4L/DVB (3506): Cinergy T2 dmx cleanup on disconnect
authorMarkus Rechberger <mrechberger@gmail.com>
Wed, 15 Mar 2006 12:31:31 +0000 (09:31 -0300)
committerLinus Torvalds <torvalds@g5.osdl.org>
Tue, 21 Mar 2006 16:53:34 +0000 (08:53 -0800)
Detaching the device didn't clean up several device files in /dev/dvb,
after applying that patch all dvb devices disappeared as expected.

Signed-off-by: Markus Rechberger <mrechberger@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/dvb/cinergyT2/cinergyT2.c

index 29b7be5271d4a3c1f7616f99184f67d6b682d068..71b575dc22bdb2fbfe7a21261da549ffaa8f2cb6 100644 (file)
@@ -506,6 +506,9 @@ static int cinergyt2_open (struct inode *inode, struct file *file)
 
 static void cinergyt2_unregister(struct cinergyt2 *cinergyt2)
 {
+       dvb_net_release(&cinergyt2->dvbnet);
+       dvb_dmxdev_release(&cinergyt2->dmxdev);
+       dvb_dmx_release(&cinergyt2->demux);
        dvb_unregister_device(cinergyt2->fedev);
        dvb_unregister_adapter(&cinergyt2->adapter);
 
@@ -938,6 +941,7 @@ static int cinergyt2_probe (struct usb_interface *intf,
        return 0;
 
 bailout:
+       dvb_net_release(&cinergyt2->dvbnet);
        dvb_dmxdev_release(&cinergyt2->dmxdev);
        dvb_dmx_release(&cinergyt2->demux);
        dvb_unregister_adapter(&cinergyt2->adapter);