aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/smc91x.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/smc91x.c')
-rw-r--r--drivers/net/smc91x.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/drivers/net/smc91x.c b/drivers/net/smc91x.c
index 7da7589d45d..4020e9e955b 100644
--- a/drivers/net/smc91x.c
+++ b/drivers/net/smc91x.c
@@ -1775,7 +1775,8 @@ static int __init smc_findirq(void __iomem *ioaddr)
1775 * o actually GRAB the irq. 1775 * o actually GRAB the irq.
1776 * o GRAB the region 1776 * o GRAB the region
1777 */ 1777 */
1778static int __init smc_probe(struct net_device *dev, void __iomem *ioaddr) 1778static int __init smc_probe(struct net_device *dev, void __iomem *ioaddr,
1779 unsigned long irq_flags)
1779{ 1780{
1780 struct smc_local *lp = netdev_priv(dev); 1781 struct smc_local *lp = netdev_priv(dev);
1781 static int version_printed = 0; 1782 static int version_printed = 0;
@@ -1941,7 +1942,7 @@ static int __init smc_probe(struct net_device *dev, void __iomem *ioaddr)
1941 } 1942 }
1942 1943
1943 /* Grab the IRQ */ 1944 /* Grab the IRQ */
1944 retval = request_irq(dev->irq, &smc_interrupt, SMC_IRQ_FLAGS, dev->name, dev); 1945 retval = request_irq(dev->irq, &smc_interrupt, irq_flags, dev->name, dev);
1945 if (retval) 1946 if (retval)
1946 goto err_out; 1947 goto err_out;
1947 1948
@@ -2123,8 +2124,9 @@ static void smc_release_datacs(struct platform_device *pdev, struct net_device *
2123static int smc_drv_probe(struct platform_device *pdev) 2124static int smc_drv_probe(struct platform_device *pdev)
2124{ 2125{
2125 struct net_device *ndev; 2126 struct net_device *ndev;
2126 struct resource *res; 2127 struct resource *res, *ires;
2127 unsigned int __iomem *addr; 2128 unsigned int __iomem *addr;
2129 unsigned long irq_flags = SMC_IRQ_FLAGS;
2128 int ret; 2130 int ret;
2129 2131
2130 res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "smc91x-regs"); 2132 res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "smc91x-regs");
@@ -2150,12 +2152,17 @@ static int smc_drv_probe(struct platform_device *pdev)
2150 SET_NETDEV_DEV(ndev, &pdev->dev); 2152 SET_NETDEV_DEV(ndev, &pdev->dev);
2151 2153
2152 ndev->dma = (unsigned char)-1; 2154 ndev->dma = (unsigned char)-1;
2153 ndev->irq = platform_get_irq(pdev, 0); 2155
2154 if (ndev->irq < 0) { 2156 ires = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
2157 if (!ires) {
2155 ret = -ENODEV; 2158 ret = -ENODEV;
2156 goto out_free_netdev; 2159 goto out_free_netdev;
2157 } 2160 }
2158 2161
2162 ndev->irq = ires->start;
2163 if (SMC_IRQ_FLAGS == -1)
2164 irq_flags = ires->flags & IRQF_TRIGGER_MASK;
2165
2159 ret = smc_request_attrib(pdev); 2166 ret = smc_request_attrib(pdev);
2160 if (ret) 2167 if (ret)
2161 goto out_free_netdev; 2168 goto out_free_netdev;
@@ -2181,7 +2188,7 @@ static int smc_drv_probe(struct platform_device *pdev)
2181#endif 2188#endif
2182 2189
2183 platform_set_drvdata(pdev, ndev); 2190 platform_set_drvdata(pdev, ndev);
2184 ret = smc_probe(ndev, addr); 2191 ret = smc_probe(ndev, addr, irq_flags);
2185 if (ret != 0) 2192 if (ret != 0)
2186 goto out_iounmap; 2193 goto out_iounmap;
2187 2194