Commit 59a7ad6c authored by Johannes Stezenbach's avatar Johannes Stezenbach Committed by Linus Torvalds

[PATCH] dvb: flexcop: fix module refcount handling

Corrected the THIS_MODULE handling for the flexcop-stuff and dvb-usb which
lead to oopses because of misorganized module dependencies.
Signed-off-by: default avatarPatrick Boettcher <pb@linuxtv.org>
Signed-off-by: default avatarJohannes Stezenbach <js@linuxtv.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent c4ee3fd4
...@@ -75,6 +75,8 @@ struct flexcop_device { ...@@ -75,6 +75,8 @@ struct flexcop_device {
struct i2c_adapter i2c_adap; struct i2c_adapter i2c_adap;
struct semaphore i2c_sem; struct semaphore i2c_sem;
struct module *owner;
/* options and status */ /* options and status */
int extra_feedcount; int extra_feedcount;
int feedcount; int feedcount;
......
...@@ -309,6 +309,7 @@ static int flexcop_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e ...@@ -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->bus_type = FC_PCI;
fc->dev = &pdev->dev; fc->dev = &pdev->dev;
fc->owner = THIS_MODULE;
/* bus specific part */ /* bus specific part */
fc_pci->pdev = pdev; fc_pci->pdev = pdev;
......
...@@ -498,6 +498,7 @@ static int flexcop_usb_probe(struct usb_interface *intf, ...@@ -498,6 +498,7 @@ static int flexcop_usb_probe(struct usb_interface *intf,
fc->bus_type = FC_USB; fc->bus_type = FC_USB;
fc->dev = &udev->dev; fc->dev = &udev->dev;
fc->owner = THIS_MODULE;
/* bus specific part */ /* bus specific part */
fc_usb->udev = udev; fc_usb->udev = udev;
......
...@@ -67,7 +67,7 @@ static int flexcop_dvb_stop_feed(struct dvb_demux_feed *dvbdmxfeed) ...@@ -67,7 +67,7 @@ static int flexcop_dvb_stop_feed(struct dvb_demux_feed *dvbdmxfeed)
static int flexcop_dvb_init(struct flexcop_device *fc) static int flexcop_dvb_init(struct flexcop_device *fc)
{ {
int ret; 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"); err("error registering DVB adapter");
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment