提交 dc66daa9 编写于 作者: J Jon Mason 提交者: David S. Miller

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: NJon Mason <jon.mason@exar.com>
Signed-off-by: NRam Vepa <ram.vepa@exar.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 c92bf70d
......@@ -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;
......@@ -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:
......@@ -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__);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
反馈
建议
客服 返回
顶部