Skip to content

Commit

Permalink
vxge: use pci_request_region()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jon Mason authored and David S. Miller committed Dec 11, 2010
1 parent c92bf70 commit dc66daa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/net/vxge/vxge-main.c
Original file line number Diff line number Diff line change
Expand Up @@ -4325,7 +4325,7 @@ vxge_probe(struct pci_dev *pdev, const struct pci_device_id *pre)
goto _exit1;
}

if (pci_request_regions(pdev, VXGE_DRIVER_NAME)) {
if (pci_request_region(pdev, 0, VXGE_DRIVER_NAME)) {
vxge_debug_init(VXGE_ERR,
"%s : request regions failed", __func__);
ret = -ENODEV;
Expand Down Expand Up @@ -4638,7 +4638,7 @@ vxge_probe(struct pci_dev *pdev, const struct pci_device_id *pre)
_exit3:
iounmap(attr.bar0);
_exit2:
pci_release_regions(pdev);
pci_release_region(pdev, 0);
_exit1:
pci_disable_device(pdev);
_exit0:
Expand Down Expand Up @@ -4695,7 +4695,7 @@ static void __devexit vxge_remove(struct pci_dev *pdev)
vxge_hw_device_terminate(hldev);

pci_disable_device(pdev);
pci_release_regions(pdev);
pci_release_region(pdev, 0);
pci_set_drvdata(pdev, NULL);
vxge_debug_entryexit(vdev->level_trace, "%s:%d Exiting...", __func__,
__LINE__);
Expand Down

0 comments on commit dc66daa

Please sign in to comment.