diff options
author | Grant Likely <grant.likely@linaro.org> | 2014-11-24 14:50:07 +0000 |
---|---|---|
committer | Grant Likely <grant.likely@linaro.org> | 2014-11-24 14:50:07 +0000 |
commit | 66e6a5a1fcd2f3e05f4d499b539a1f77ceb52d1d (patch) | |
tree | d72f980f64b88ea4e976215a503fcb038e02f981 /drivers/net/ethernet/smsc/smc91x.c | |
parent | 2d0747c4b68be8eb8ccfa2c538f2f5dd2ea89094 (diff) | |
parent | 5d01410fe4d92081f349b013a2e7a95429e4f2c9 (diff) | |
download | op-kernel-dev-66e6a5a1fcd2f3e05f4d499b539a1f77ceb52d1d.zip op-kernel-dev-66e6a5a1fcd2f3e05f4d499b539a1f77ceb52d1d.tar.gz |
Merge tag 'v3.18-rc6' into devicetree/next
v3.18-rc6 contains an important DT bug fix, c1a2086e2d, "of/selftest:
Fix off-by-one error in removal path" which affects testing of the
overlay patch series. Merge it into the devicetree/next staging branch
so that the overlay patches are applied on top of a known working tree.
Linux 3.18-rc6
Conflicts:
drivers/of/address.c
Diffstat (limited to 'drivers/net/ethernet/smsc/smc91x.c')
-rw-r--r-- | drivers/net/ethernet/smsc/smc91x.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/drivers/net/ethernet/smsc/smc91x.c b/drivers/net/ethernet/smsc/smc91x.c index 2c62208..6cc3cf6 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) const struct of_device_id *match = NULL; struct smc_local *lp; struct net_device *ndev; - struct resource *res, *ires; + struct resource *res; unsigned int __iomem *addr; unsigned long irq_flags = SMC_IRQ_FLAGS; + unsigned long irq_resflags; int ret; ndev = alloc_etherdev(sizeof(struct smc_local)); @@ -2337,16 +2338,19 @@ static int smc_drv_probe(struct platform_device *pdev) goto out_free_netdev; } - ires = platform_get_resource(pdev, IORESOURCE_IRQ, 0); - if (!ires) { + ndev->irq = platform_get_irq(pdev, 0); + if (ndev->irq <= 0) { ret = -ENODEV; goto out_release_io; } - - ndev->irq = ires->start; - - if (irq_flags == -1 || ires->flags & IRQF_TRIGGER_MASK) - irq_flags = ires->flags & IRQF_TRIGGER_MASK; + /* + * If this platform does not specify any special irqflags, or if + * the resource supplies a trigger, override the irqflags with + * the trigger flags from the resource. + */ + irq_resflags = irqd_get_trigger_type(irq_get_irq_data(ndev->irq)); + if (irq_flags == -1 || irq_resflags & IRQF_TRIGGER_MASK) + irq_flags = irq_resflags & IRQF_TRIGGER_MASK; ret = smc_request_attrib(pdev, ndev); if (ret) |