From: Johannes Stezenbach 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 Signed-off-by: Johannes Stezenbach Signed-off-by: Andrew Morton --- drivers/media/dvb/b2c2/flexcop-common.h | 2 ++ drivers/media/dvb/b2c2/flexcop-pci.c | 1 + drivers/media/dvb/b2c2/flexcop-usb.c | 1 + drivers/media/dvb/b2c2/flexcop.c | 2 +- 4 files changed, 5 insertions(+), 1 deletion(-) diff -puN drivers/media/dvb/b2c2/flexcop.c~dvb-flexcop-fix-module-refcount-handling drivers/media/dvb/b2c2/flexcop.c --- 25/drivers/media/dvb/b2c2/flexcop.c~dvb-flexcop-fix-module-refcount-handling 2005-05-13 23:56:50.000000000 -0700 +++ 25-akpm/drivers/media/dvb/b2c2/flexcop.c 2005-05-13 23:56:50.000000000 -0700 @@ -67,7 +67,7 @@ static int flexcop_dvb_stop_feed(struct 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; } diff -puN drivers/media/dvb/b2c2/flexcop-common.h~dvb-flexcop-fix-module-refcount-handling drivers/media/dvb/b2c2/flexcop-common.h --- 25/drivers/media/dvb/b2c2/flexcop-common.h~dvb-flexcop-fix-module-refcount-handling 2005-05-13 23:56:50.000000000 -0700 +++ 25-akpm/drivers/media/dvb/b2c2/flexcop-common.h 2005-05-13 23:56:50.000000000 -0700 @@ -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; diff -puN drivers/media/dvb/b2c2/flexcop-pci.c~dvb-flexcop-fix-module-refcount-handling drivers/media/dvb/b2c2/flexcop-pci.c --- 25/drivers/media/dvb/b2c2/flexcop-pci.c~dvb-flexcop-fix-module-refcount-handling 2005-05-13 23:56:50.000000000 -0700 +++ 25-akpm/drivers/media/dvb/b2c2/flexcop-pci.c 2005-05-13 23:56:50.000000000 -0700 @@ -309,6 +309,7 @@ static int flexcop_pci_probe(struct pci_ fc->bus_type = FC_PCI; fc->dev = &pdev->dev; + fc->owner = THIS_MODULE; /* bus specific part */ fc_pci->pdev = pdev; diff -puN drivers/media/dvb/b2c2/flexcop-usb.c~dvb-flexcop-fix-module-refcount-handling drivers/media/dvb/b2c2/flexcop-usb.c --- 25/drivers/media/dvb/b2c2/flexcop-usb.c~dvb-flexcop-fix-module-refcount-handling 2005-05-13 23:56:50.000000000 -0700 +++ 25-akpm/drivers/media/dvb/b2c2/flexcop-usb.c 2005-05-13 23:56:50.000000000 -0700 @@ -498,6 +498,7 @@ static int flexcop_usb_probe(struct usb_ fc->bus_type = FC_USB; fc->dev = &udev->dev; + fc->owner = THIS_MODULE; /* bus specific part */ fc_usb->udev = udev; _