aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJon Mason <jon.mason@exar.com>2010-12-10 09:02:58 -0500
committerDavid S. Miller <davem@davemloft.net>2010-12-10 19:08:22 -0500
commitdc66daa9be40369ead5a4ee33c6bcfb44cb3c8ee (patch)
treeb725d5b54211a832f33a77a27aec9cbba882455a
parentc92bf70dcb9d08f821e4c9f09f8fc328495ba998 (diff)
vxge: use pci_request_region()
Only BAR0 is ever accessed, thus making the calls to pci_request_regions overkill. Change calls of pci_request_regions to pci_request_region to reduce the size of the mapped area. Signed-off-by: Jon Mason <jon.mason@exar.com> Signed-off-by: Ram Vepa <ram.vepa@exar.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/vxge/vxge-main.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/vxge/vxge-main.c b/drivers/net/vxge/vxge-main.c
index 9c68c60f27d8..faebffb02d12 100644
--- a/drivers/net/vxge/vxge-main.c
+++ b/drivers/net/vxge/vxge-main.c
@@ -4325,7 +4325,7 @@ vxge_probe(struct pci_dev *pdev, const struct pci_device_id *pre)
4325 goto _exit1; 4325 goto _exit1;
4326 } 4326 }
4327 4327
4328 if (pci_request_regions(pdev, VXGE_DRIVER_NAME)) { 4328 if (pci_request_region(pdev, 0, VXGE_DRIVER_NAME)) {
4329 vxge_debug_init(VXGE_ERR, 4329 vxge_debug_init(VXGE_ERR,
4330 "%s : request regions failed", __func__); 4330 "%s : request regions failed", __func__);
4331 ret = -ENODEV; 4331 ret = -ENODEV;
@@ -4638,7 +4638,7 @@ _exit4:
4638_exit3: 4638_exit3:
4639 iounmap(attr.bar0); 4639 iounmap(attr.bar0);
4640_exit2: 4640_exit2:
4641 pci_release_regions(pdev); 4641 pci_release_region(pdev, 0);
4642_exit1: 4642_exit1:
4643 pci_disable_device(pdev); 4643 pci_disable_device(pdev);
4644_exit0: 4644_exit0:
@@ -4695,7 +4695,7 @@ static void __devexit vxge_remove(struct pci_dev *pdev)
4695 vxge_hw_device_terminate(hldev); 4695 vxge_hw_device_terminate(hldev);
4696 4696
4697 pci_disable_device(pdev); 4697 pci_disable_device(pdev);
4698 pci_release_regions(pdev); 4698 pci_release_region(pdev, 0);
4699 pci_set_drvdata(pdev, NULL); 4699 pci_set_drvdata(pdev, NULL);
4700 vxge_debug_entryexit(vdev->level_trace, "%s:%d Exiting...", __func__, 4700 vxge_debug_entryexit(vdev->level_trace, "%s:%d Exiting...", __func__,
4701 __LINE__); 4701 __LINE__);