Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 27272
b: refs/heads/master
c: 3d52996
h: refs/heads/master
v: v3
  • Loading branch information
Pavel Roskin authored and John W. Linville committed Apr 24, 2006
1 parent 16f8f98 commit 3a80e05
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d62274b374ce41dd3a90820b124d28fec292a5b7
refs/heads/master: 3d529962217c3fec36f53f270a37e132b9763c65
15 changes: 6 additions & 9 deletions trunk/drivers/net/wireless/orinoco_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,7 @@ static int orinoco_pci_init_one(struct pci_dev *pdev,
const struct pci_device_id *ent)
{
int err = 0;
unsigned long pci_iorange;
u16 __iomem *pci_ioaddr = NULL;
unsigned long pci_iolen;
void __iomem *pci_ioaddr = NULL;
struct orinoco_private *priv = NULL;
struct orinoco_pci_card *card;
struct net_device *dev = NULL;
Expand All @@ -190,10 +188,9 @@ static int orinoco_pci_init_one(struct pci_dev *pdev,
}

/* Resource 0 is mapped to the hermes registers */
pci_iorange = pci_resource_start(pdev, 0);
pci_iolen = pci_resource_len(pdev, 0);
pci_ioaddr = ioremap(pci_iorange, pci_iolen);
if (!pci_iorange) {
pci_ioaddr = pci_iomap(pdev, 0, 0);
if (!pci_ioaddr) {
err = -EIO;
printk(KERN_ERR PFX "Cannot remap hardware registers\n");
goto fail_map;
}
Expand All @@ -208,8 +205,8 @@ static int orinoco_pci_init_one(struct pci_dev *pdev,
priv = netdev_priv(dev);
card = priv->card;
card->pci_ioaddr = pci_ioaddr;
dev->mem_start = pci_iorange;
dev->mem_end = pci_iorange + pci_iolen - 1;
dev->mem_start = pci_resource_start(pdev, 0);
dev->mem_end = dev->mem_start + pci_resource_len(pdev, 0) - 1;
SET_MODULE_OWNER(dev);
SET_NETDEV_DEV(dev, &pdev->dev);

Expand Down

0 comments on commit 3a80e05

Please sign in to comment.