提交 e1e5770b 编写于 作者: J Jiri Slaby 提交者: Linus Torvalds

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: NJiri Slaby <jirislaby@gmail.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NAlan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 9afd561a
...@@ -1736,6 +1736,12 @@ static int __devinit isicom_probe(struct pci_dev *pdev, ...@@ -1736,6 +1736,12 @@ static int __devinit isicom_probe(struct pci_dev *pdev,
if (card_count >= BOARD_COUNT) if (card_count >= BOARD_COUNT)
goto err; 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); dev_info(&pdev->dev, "ISI PCI Card(Device ID 0x%x)\n", ent->device);
/* allot the first empty slot in the array */ /* allot the first empty slot in the array */
...@@ -1790,6 +1796,7 @@ static int __devinit isicom_probe(struct pci_dev *pdev, ...@@ -1790,6 +1796,7 @@ static int __devinit isicom_probe(struct pci_dev *pdev,
errdec: errdec:
board->base = 0; board->base = 0;
card_count--; card_count--;
pci_disable_device(pdev);
err: err:
return retval; return retval;
} }
...@@ -1806,6 +1813,7 @@ static void __devexit isicom_remove(struct pci_dev *pdev) ...@@ -1806,6 +1813,7 @@ static void __devexit isicom_remove(struct pci_dev *pdev)
pci_release_region(pdev, 3); pci_release_region(pdev, 3);
board->base = 0; board->base = 0;
card_count--; card_count--;
pci_disable_device(pdev);
} }
static int __init isicom_init(void) static int __init isicom_init(void)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册