diff options
author | Jiri Slaby <jirislaby@gmail.com> | 2008-07-16 16:52:56 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-20 20:12:34 -0400 |
commit | e1e5770bb63fb9d71619a68f52cb0ba4b2ae58a6 (patch) | |
tree | 01bbf905f75211250548591e7bb04cc110d0c8f6 /drivers | |
parent | 9afd561acabe5059ff16d163a176e2350269aba5 (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')
-rw-r--r-- | drivers/char/isicom.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/char/isicom.c b/drivers/char/isicom.c index 4f3cefa8eb0e..a1a67e3d52cc 100644 --- a/drivers/char/isicom.c +++ b/drivers/char/isicom.c | |||
@@ -1736,6 +1736,12 @@ static int __devinit isicom_probe(struct pci_dev *pdev, | |||
1736 | if (card_count >= BOARD_COUNT) | 1736 | if (card_count >= BOARD_COUNT) |
1737 | goto err; | 1737 | goto err; |
1738 | 1738 | ||
1739 | retval = pci_enable_device(pdev); | ||
1740 | if (retval) { | ||
1741 | dev_err(&pdev->dev, "failed to enable\n"); | ||
1742 | goto err; | ||
1743 | } | ||
1744 | |||
1739 | dev_info(&pdev->dev, "ISI PCI Card(Device ID 0x%x)\n", ent->device); | 1745 | dev_info(&pdev->dev, "ISI PCI Card(Device ID 0x%x)\n", ent->device); |
1740 | 1746 | ||
1741 | /* allot the first empty slot in the array */ | 1747 | /* allot the first empty slot in the array */ |
@@ -1790,6 +1796,7 @@ errunrr: | |||
1790 | errdec: | 1796 | errdec: |
1791 | board->base = 0; | 1797 | board->base = 0; |
1792 | card_count--; | 1798 | card_count--; |
1799 | pci_disable_device(pdev); | ||
1793 | err: | 1800 | err: |
1794 | return retval; | 1801 | return retval; |
1795 | } | 1802 | } |
@@ -1806,6 +1813,7 @@ static void __devexit isicom_remove(struct pci_dev *pdev) | |||
1806 | pci_release_region(pdev, 3); | 1813 | pci_release_region(pdev, 3); |
1807 | board->base = 0; | 1814 | board->base = 0; |
1808 | card_count--; | 1815 | card_count--; |
1816 | pci_disable_device(pdev); | ||
1809 | } | 1817 | } |
1810 | 1818 | ||
1811 | static int __init isicom_init(void) | 1819 | static int __init isicom_init(void) |