Commit 78028da9 authored by Jiri Slaby's avatar Jiri Slaby Committed by Linus Torvalds

[PATCH] Char: isicom, use pci_request_region

Use pci_request_region in pci probing function instead of request_region.
Signed-off-by: default avatarJiri Slaby <jirislaby@gmail.com>
Acked-by: default avatarAlan Cox <alan@redhat.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 938a7023
...@@ -1789,7 +1789,8 @@ static int __devinit isicom_probe(struct pci_dev *pdev, ...@@ -1789,7 +1789,8 @@ static int __devinit isicom_probe(struct pci_dev *pdev,
pci_set_drvdata(pdev, board); pci_set_drvdata(pdev, board);
if (!request_region(board->base, 16, ISICOM_NAME)) { retval = pci_request_region(pdev, 3, ISICOM_NAME);
if (retval) {
dev_err(&pdev->dev, "I/O Region 0x%lx-0x%lx is busy. Card%d " dev_err(&pdev->dev, "I/O Region 0x%lx-0x%lx is busy. Card%d "
"will be disabled.\n", board->base, board->base + 15, "will be disabled.\n", board->base, board->base + 15,
index + 1); index + 1);
...@@ -1822,7 +1823,7 @@ static int __devinit isicom_probe(struct pci_dev *pdev, ...@@ -1822,7 +1823,7 @@ static int __devinit isicom_probe(struct pci_dev *pdev,
errunri: errunri:
free_irq(board->irq, board); free_irq(board->irq, board);
errunrr: errunrr:
release_region(board->base, 16); pci_release_region(pdev, 3);
err: err:
board->base = 0; board->base = 0;
return retval; return retval;
...@@ -1837,7 +1838,7 @@ static void __devexit isicom_remove(struct pci_dev *pdev) ...@@ -1837,7 +1838,7 @@ static void __devexit isicom_remove(struct pci_dev *pdev)
tty_unregister_device(isicom_normal, board->index * 16 + i); tty_unregister_device(isicom_normal, board->index * 16 + i);
free_irq(board->irq, board); free_irq(board->irq, board);
release_region(board->base, 16); pci_release_region(pdev, 3);
} }
static int __init isicom_init(void) static int __init isicom_init(void)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment