Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 133930
b: refs/heads/master
c: 61307ed
h: refs/heads/master
v: v3
  • Loading branch information
Steve Glendinning authored and David S. Miller committed Feb 1, 2009
1 parent 1818d99 commit df3985a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 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: 05bee4737774881e027bfd9a8b5c40a7d68f6325
refs/heads/master: 61307ed85dbf0ee232e354721a5a0a2011da7996
19 changes: 14 additions & 5 deletions trunk/drivers/net/smsc911x.c
Original file line number Diff line number Diff line change
Expand Up @@ -1886,9 +1886,9 @@ static int __devinit smsc911x_drv_probe(struct platform_device *pdev)
struct net_device *dev;
struct smsc911x_data *pdata;
struct smsc911x_platform_config *config = pdev->dev.platform_data;
struct resource *res;
struct resource *res, *irq_res;
unsigned int intcfg = 0;
int res_size;
int res_size, irq_flags;
int retval;
DECLARE_MAC_BUF(mac);

Expand All @@ -1913,6 +1913,14 @@ static int __devinit smsc911x_drv_probe(struct platform_device *pdev)
}
res_size = res->end - res->start;

irq_res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
if (!irq_res) {
pr_warning("%s: Could not allocate irq resource.\n",
SMSC_CHIPNAME);
retval = -ENODEV;
goto out_0;
}

if (!request_mem_region(res->start, res_size, SMSC_CHIPNAME)) {
retval = -EBUSY;
goto out_0;
Expand All @@ -1929,7 +1937,8 @@ static int __devinit smsc911x_drv_probe(struct platform_device *pdev)

pdata = netdev_priv(dev);

dev->irq = platform_get_irq(pdev, 0);
dev->irq = irq_res->start;
irq_flags = irq_res->flags & IRQF_TRIGGER_MASK;
pdata->ioaddr = ioremap_nocache(res->start, res_size);

/* copy config parameters across to pdata */
Expand Down Expand Up @@ -1962,8 +1971,8 @@ static int __devinit smsc911x_drv_probe(struct platform_device *pdev)
smsc911x_reg_write(pdata, INT_EN, 0);
smsc911x_reg_write(pdata, INT_STS, 0xFFFFFFFF);

retval = request_irq(dev->irq, smsc911x_irqhandler, IRQF_DISABLED,
dev->name, dev);
retval = request_irq(dev->irq, smsc911x_irqhandler,
irq_flags | IRQF_DISABLED, dev->name, dev);
if (retval) {
SMSC_WARNING(PROBE,
"Unable to claim requested irq: %d", dev->irq);
Expand Down

0 comments on commit df3985a

Please sign in to comment.