All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jon Mason <jon.mason@exar.com>
To: "David S. Miller" <davem@davemloft.net>
Cc: netdev@vger.kernel.org,
	Sivakumar Subramani <sivakumar.subramani@exar.com>,
	Sreenivasa Honnur <sreenivasa.honnur@exar.com>,
	Ram Vepa <ram.vepa@exar.com>
Subject: [PATCH 3/7] vxge: use pci_request_region()
Date: Fri, 10 Dec 2010 18:02:58 -0600	[thread overview]
Message-ID: <1292025782-16372-3-git-send-email-jon.mason@exar.com> (raw)
In-Reply-To: <1292025782-16372-1-git-send-email-jon.mason@exar.com>

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>
---
 drivers/net/vxge/vxge-main.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/vxge/vxge-main.c b/drivers/net/vxge/vxge-main.c
index 9c68c60..faebffb 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)
 		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 @@ _exit4:
 _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__);
-- 
1.7.0.4


  parent reply	other threads:[~2010-12-11  0:03 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-11  0:02 [PATCH 1/7] vxge: code cleanup and reorganization Jon Mason
2010-12-11  0:02 ` [PATCH 2/7] vxge: fix crash of VF when unloading PF Jon Mason
2010-12-11  0:08   ` David Miller
2010-12-11  1:04   ` Chris Wright
2010-12-11  1:35     ` Ramkrishna Vepa
2010-12-11  0:02 ` Jon Mason [this message]
2010-12-11  0:09   ` [PATCH 3/7] vxge: use pci_request_region() David Miller
2010-12-11  0:02 ` [PATCH 4/7] vxge: transmit timeout deadlock Jon Mason
2010-12-11  0:09   ` David Miller
2010-12-11  0:03 ` [PATCH 5/7] vxge: hotplug stall Jon Mason
2010-12-11  0:09   ` David Miller
2010-12-11  0:03 ` [PATCH 6/7] vxge: independent interrupt moderation Jon Mason
2010-12-11  0:09   ` David Miller
2010-12-11  0:03 ` [PATCH 7/7] vxge: update driver version Jon Mason
2010-12-11  0:09   ` David Miller
2010-12-11  0:08 ` [PATCH 1/7] vxge: code cleanup and reorganization David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1292025782-16372-3-git-send-email-jon.mason@exar.com \
    --to=jon.mason@exar.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=ram.vepa@exar.com \
    --cc=sivakumar.subramani@exar.com \
    --cc=sreenivasa.honnur@exar.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.