Skip to content

Commit

Permalink
[PATCH] dvb: flexcop: fix module refcount handling
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Johannes Stezenbach authored and Linus Torvalds committed May 17, 2005
1 parent c4ee3fd commit 59a7ad6
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions drivers/media/dvb/b2c2/flexcop-common.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions drivers/media/dvb/b2c2/flexcop-pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions drivers/media/dvb/b2c2/flexcop-usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion drivers/media/dvb/b2c2/flexcop.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 59a7ad6

Please sign in to comment.