summaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
authorJiri Slaby <jirislaby@gmail.com>2008-07-16 21:52:56 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-20 17:12:34 -0700
commite1e5770bb63fb9d71619a68f52cb0ba4b2ae58a6 (patch)
tree01bbf905f75211250548591e7bb04cc110d0c8f6 /drivers/char
parent9afd561acabe5059ff16d163a176e2350269aba5 (diff)
tty: isicom, enable/disable pci device
Don't forget to enable and disable PCI devices. The device might be unusable without that. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/isicom.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/char/isicom.c b/drivers/char/isicom.c
index 4f3cefa8eb0..a1a67e3d52c 100644
--- a/drivers/char/isicom.c
+++ b/drivers/char/isicom.c
@@ -1736,6 +1736,12 @@ static int __devinit isicom_probe(struct pci_dev *pdev,
if (card_count >= BOARD_COUNT)
goto err;
+ retval = pci_enable_device(pdev);
+ if (retval) {
+ dev_err(&pdev->dev, "failed to enable\n");
+ goto err;
+ }
+
dev_info(&pdev->dev, "ISI PCI Card(Device ID 0x%x)\n", ent->device);
/* allot the first empty slot in the array */
@@ -1790,6 +1796,7 @@ errunrr:
errdec:
board->base = 0;
card_count--;
+ pci_disable_device(pdev);
err:
return retval;
}
@@ -1806,6 +1813,7 @@ static void __devexit isicom_remove(struct pci_dev *pdev)
pci_release_region(pdev, 3);
board->base = 0;
card_count--;
+ pci_disable_device(pdev);
}
static int __init isicom_init(void)