aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJiri Slaby <jirislaby@gmail.com>2006-12-08 05:38:16 -0500
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-08 11:28:53 -0500
commit596280156afa99cb02f2193e0e06e6e4f2434f30 (patch)
tree5ce9198cda0d55f281f3fe8621aa963f6905c0c7
parent943f295903e152f940ba4260d1e790a05d2f64a3 (diff)
[PATCH] char: mxser_new, pci_request_region for pci regions
mxser_new, pci_request_region for pci regions Use pci_request_region instead of standard request_region for pci device regions. More checking, simplier use. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--drivers/char/mxser_new.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/char/mxser_new.c b/drivers/char/mxser_new.c
index 863c1b27849b..4db43f31b693 100644
--- a/drivers/char/mxser_new.c
+++ b/drivers/char/mxser_new.c
@@ -526,8 +526,8 @@ static void __exit mxser_module_exit(void)
526 pdev = mxser_boards[i].pdev; 526 pdev = mxser_boards[i].pdev;
527 free_irq(mxser_boards[i].irq, &mxser_boards[i]); 527 free_irq(mxser_boards[i].irq, &mxser_boards[i]);
528 if (pdev != NULL) { /* PCI */ 528 if (pdev != NULL) { /* PCI */
529 release_region(pci_resource_start(pdev, 2), pci_resource_len(pdev, 2)); 529 pci_release_region(pdev, 2);
530 release_region(pci_resource_start(pdev, 3), pci_resource_len(pdev, 3)); 530 pci_release_region(pdev, 3);
531 pci_dev_put(pdev); 531 pci_dev_put(pdev);
532 } else { 532 } else {
533 release_region(mxser_boards[i].ports[0].ioaddr, 8 * mxser_boards[i].nports); 533 release_region(mxser_boards[i].ports[0].ioaddr, 8 * mxser_boards[i].nports);
@@ -627,16 +627,14 @@ static int __init mxser_get_PCI_conf(int board_type, struct mxser_board *brd,
627 brd->board_type = board_type; 627 brd->board_type = board_type;
628 brd->nports = mxser_numports[board_type - 1]; 628 brd->nports = mxser_numports[board_type - 1];
629 ioaddress = pci_resource_start(pdev, 2); 629 ioaddress = pci_resource_start(pdev, 2);
630 request_region(pci_resource_start(pdev, 2), pci_resource_len(pdev, 2), 630 pci_request_region(pdev, 2, "mxser(IO)");
631 "mxser(IO)");
632 631
633 for (i = 0; i < brd->nports; i++) 632 for (i = 0; i < brd->nports; i++)
634 brd->ports[i].ioaddr = ioaddress + 8 * i; 633 brd->ports[i].ioaddr = ioaddress + 8 * i;
635 634
636 /* vector */ 635 /* vector */
637 ioaddress = pci_resource_start(pdev, 3); 636 ioaddress = pci_resource_start(pdev, 3);
638 request_region(pci_resource_start(pdev, 3), pci_resource_len(pdev, 3), 637 pci_request_region(pdev, 3, "mxser(vector)");
639 "mxser(vector)");
640 brd->vector = ioaddress; 638 brd->vector = ioaddress;
641 639
642 /* irq */ 640 /* irq */