]> err.no Git - linux-2.6/commitdiff
[PATCH] dvb: flexcop: fix module refcount handling
authorJohannes Stezenbach <js@linuxtv.org>
Tue, 17 May 2005 04:54:16 +0000 (21:54 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Tue, 17 May 2005 14:59:25 +0000 (07:59 -0700)
Corrected the THIS_MODULE handling for the flexcop-stuff and dvb-usb which
lead to oopses because of misorganized module dependencies.

Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Johannes Stezenbach <js@linuxtv.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/media/dvb/b2c2/flexcop-common.h
drivers/media/dvb/b2c2/flexcop-pci.c
drivers/media/dvb/b2c2/flexcop-usb.c
drivers/media/dvb/b2c2/flexcop.c

index 79e8581b4fb709e1c5f73271951b7907e048fcdc..773d158032dfb4cf26ef4cf7aea8a1ef51dc23ea 100644 (file)
@@ -75,6 +75,8 @@ struct flexcop_device {
        struct i2c_adapter i2c_adap;
        struct semaphore i2c_sem;
 
+       struct module *owner;
+
        /* options and status */
        int extra_feedcount;
        int feedcount;
index 78952096fb7478bc045b8c465d06ff744bc48eae..ed717c0073d5d63db1b3e1cf39011d51b9236db4 100644 (file)
@@ -309,6 +309,7 @@ static int flexcop_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e
        fc->bus_type = FC_PCI;
 
        fc->dev = &pdev->dev;
+       fc->owner = THIS_MODULE;
 
 /* bus specific part */
        fc_pci->pdev = pdev;
index 20db6329a6866b6b68b7b90fc497af98f431eac1..0113449abd15107479b1722308309900f97bb0b5 100644 (file)
@@ -498,6 +498,7 @@ static int flexcop_usb_probe(struct usb_interface *intf,
        fc->bus_type = FC_USB;
 
        fc->dev = &udev->dev;
+       fc->owner = THIS_MODULE;
 
 /* bus specific part */
        fc_usb->udev = udev;
index ad590875064b721ffc74a9ba9725f03b9af9d9a1..df55e4c8ecd86cceae70dc667cc4e4778ad12d00 100644 (file)
@@ -67,7 +67,7 @@ static int flexcop_dvb_stop_feed(struct dvb_demux_feed *dvbdmxfeed)
 static int flexcop_dvb_init(struct flexcop_device *fc)
 {
        int ret;
-       if ((ret = dvb_register_adapter(&fc->dvb_adapter,"FlexCop Digital TV device",THIS_MODULE)) < 0) {
+       if ((ret = dvb_register_adapter(&fc->dvb_adapter,"FlexCop Digital TV device",fc->owner)) < 0) {
                err("error registering DVB adapter");
                return ret;
        }