Skip to content

Commit 19ecb6b

Browse files
committed
niu: Use pci_ioremap_bar().
Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent ca8eac5 commit 19ecb6b

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

drivers/net/niu.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8667,7 +8667,6 @@ static void __devinit niu_device_announce(struct niu *np)
86678667
static int __devinit niu_pci_init_one(struct pci_dev *pdev,
86688668
const struct pci_device_id *ent)
86698669
{
8670-
unsigned long niureg_base, niureg_len;
86718670
union niu_parent_id parent_id;
86728671
struct net_device *dev;
86738672
struct niu *np;
@@ -8758,10 +8757,7 @@ static int __devinit niu_pci_init_one(struct pci_dev *pdev,
87588757

87598758
dev->features |= (NETIF_F_SG | NETIF_F_HW_CSUM);
87608759

8761-
niureg_base = pci_resource_start(pdev, 0);
8762-
niureg_len = pci_resource_len(pdev, 0);
8763-
8764-
np->regs = ioremap_nocache(niureg_base, niureg_len);
8760+
np->regs = pci_ioremap_bar(pdev, 0);
87658761
if (!np->regs) {
87668762
dev_err(&pdev->dev, PFX "Cannot map device registers, "
87678763
"aborting.\n");

0 commit comments

Comments
 (0)