aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/smsc/smc91x.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ethernet/smsc/smc91x.c')
-rw-r--r--drivers/net/ethernet/smsc/smc91x.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/drivers/net/ethernet/smsc/smc91x.c b/drivers/net/ethernet/smsc/smc91x.c
index 2c62208077fe..6cc3cf6f17c8 100644
--- a/drivers/net/ethernet/smsc/smc91x.c
+++ b/drivers/net/ethernet/smsc/smc91x.c
@@ -2243,9 +2243,10 @@ static int smc_drv_probe(struct platform_device *pdev)
2243 const struct of_device_id *match = NULL; 2243 const struct of_device_id *match = NULL;
2244 struct smc_local *lp; 2244 struct smc_local *lp;
2245 struct net_device *ndev; 2245 struct net_device *ndev;
2246 struct resource *res, *ires; 2246 struct resource *res;
2247 unsigned int __iomem *addr; 2247 unsigned int __iomem *addr;
2248 unsigned long irq_flags = SMC_IRQ_FLAGS; 2248 unsigned long irq_flags = SMC_IRQ_FLAGS;
2249 unsigned long irq_resflags;
2249 int ret; 2250 int ret;
2250 2251
2251 ndev = alloc_etherdev(sizeof(struct smc_local)); 2252 ndev = alloc_etherdev(sizeof(struct smc_local));
@@ -2337,16 +2338,19 @@ static int smc_drv_probe(struct platform_device *pdev)
2337 goto out_free_netdev; 2338 goto out_free_netdev;
2338 } 2339 }
2339 2340
2340 ires = platform_get_resource(pdev, IORESOURCE_IRQ, 0); 2341 ndev->irq = platform_get_irq(pdev, 0);
2341 if (!ires) { 2342 if (ndev->irq <= 0) {
2342 ret = -ENODEV; 2343 ret = -ENODEV;
2343 goto out_release_io; 2344 goto out_release_io;
2344 } 2345 }
2345 2346 /*
2346 ndev->irq = ires->start; 2347 * If this platform does not specify any special irqflags, or if
2347 2348 * the resource supplies a trigger, override the irqflags with
2348 if (irq_flags == -1 || ires->flags & IRQF_TRIGGER_MASK) 2349 * the trigger flags from the resource.
2349 irq_flags = ires->flags & IRQF_TRIGGER_MASK; 2350 */
2351 irq_resflags = irqd_get_trigger_type(irq_get_irq_data(ndev->irq));
2352 if (irq_flags == -1 || irq_resflags & IRQF_TRIGGER_MASK)
2353 irq_flags = irq_resflags & IRQF_TRIGGER_MASK;
2350 2354
2351 ret = smc_request_attrib(pdev, ndev); 2355 ret = smc_request_attrib(pdev, ndev);
2352 if (ret) 2356 if (ret)