diff options
author | Paul Mackerras <paulus@samba.org> | 2006-12-03 23:59:07 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-12-03 23:59:07 -0500 |
commit | 79acbb3ff2d8095b692e1502b9eb2ccec348de26 (patch) | |
tree | 6ab773e5a8f9de2cd6443362b21d0d6fffe3b35e /drivers/char/moxa.c | |
parent | 19a79859e168640f8e16d7b216d211c1c52b687a (diff) | |
parent | 2b5f6dcce5bf94b9b119e9ed8d537098ec61c3d2 (diff) |
Merge branch 'linux-2.6' into for-linus
Diffstat (limited to 'drivers/char/moxa.c')
-rw-r--r-- | drivers/char/moxa.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/char/moxa.c b/drivers/char/moxa.c index b401383808c2..96cb1f07332b 100644 --- a/drivers/char/moxa.c +++ b/drivers/char/moxa.c | |||
@@ -130,6 +130,7 @@ static moxa_isa_board_conf moxa_isa_boards[] = | |||
130 | typedef struct _moxa_pci_devinfo { | 130 | typedef struct _moxa_pci_devinfo { |
131 | ushort busNum; | 131 | ushort busNum; |
132 | ushort devNum; | 132 | ushort devNum; |
133 | struct pci_dev *pdev; | ||
133 | } moxa_pci_devinfo; | 134 | } moxa_pci_devinfo; |
134 | 135 | ||
135 | typedef struct _moxa_board_conf { | 136 | typedef struct _moxa_board_conf { |
@@ -324,6 +325,9 @@ static int moxa_get_PCI_conf(struct pci_dev *p, int board_type, moxa_board_conf | |||
324 | board->busType = MOXA_BUS_TYPE_PCI; | 325 | board->busType = MOXA_BUS_TYPE_PCI; |
325 | board->pciInfo.busNum = p->bus->number; | 326 | board->pciInfo.busNum = p->bus->number; |
326 | board->pciInfo.devNum = p->devfn >> 3; | 327 | board->pciInfo.devNum = p->devfn >> 3; |
328 | board->pciInfo.pdev = p; | ||
329 | /* don't lose the reference in the next pci_get_device iteration */ | ||
330 | pci_dev_get(p); | ||
327 | 331 | ||
328 | return (0); | 332 | return (0); |
329 | } | 333 | } |
@@ -493,6 +497,11 @@ static void __exit moxa_exit(void) | |||
493 | if (tty_unregister_driver(moxaDriver)) | 497 | if (tty_unregister_driver(moxaDriver)) |
494 | printk("Couldn't unregister MOXA Intellio family serial driver\n"); | 498 | printk("Couldn't unregister MOXA Intellio family serial driver\n"); |
495 | put_tty_driver(moxaDriver); | 499 | put_tty_driver(moxaDriver); |
500 | |||
501 | for (i = 0; i < MAX_BOARDS; i++) | ||
502 | if (moxa_boards[i].busType == MOXA_BUS_TYPE_PCI) | ||
503 | pci_dev_put(moxa_boards[i].pciInfo.pdev); | ||
504 | |||
496 | if (verbose) | 505 | if (verbose) |
497 | printk("Done\n"); | 506 | printk("Done\n"); |
498 | } | 507 | } |