Commit 19ecb6ba authored by David S. Miller's avatar David S. Miller

niu: Use pci_ioremap_bar().

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ca8eac55
...@@ -8667,7 +8667,6 @@ static void __devinit niu_device_announce(struct niu *np) ...@@ -8667,7 +8667,6 @@ static void __devinit niu_device_announce(struct niu *np)
static int __devinit niu_pci_init_one(struct pci_dev *pdev, static int __devinit niu_pci_init_one(struct pci_dev *pdev,
const struct pci_device_id *ent) const struct pci_device_id *ent)
{ {
unsigned long niureg_base, niureg_len;
union niu_parent_id parent_id; union niu_parent_id parent_id;
struct net_device *dev; struct net_device *dev;
struct niu *np; struct niu *np;
...@@ -8758,10 +8757,7 @@ static int __devinit niu_pci_init_one(struct pci_dev *pdev, ...@@ -8758,10 +8757,7 @@ static int __devinit niu_pci_init_one(struct pci_dev *pdev,
dev->features |= (NETIF_F_SG | NETIF_F_HW_CSUM); dev->features |= (NETIF_F_SG | NETIF_F_HW_CSUM);
niureg_base = pci_resource_start(pdev, 0); np->regs = pci_ioremap_bar(pdev, 0);
niureg_len = pci_resource_len(pdev, 0);
np->regs = ioremap_nocache(niureg_base, niureg_len);
if (!np->regs) { if (!np->regs) {
dev_err(&pdev->dev, PFX "Cannot map device registers, " dev_err(&pdev->dev, PFX "Cannot map device registers, "
"aborting.\n"); "aborting.\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment