aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/smsc911x.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/drivers/net/smsc911x.c b/drivers/net/smsc911x.c
index ae4c74b51827..d273a0720ef1 100644
--- a/drivers/net/smsc911x.c
+++ b/drivers/net/smsc911x.c
@@ -1886,9 +1886,9 @@ static int __devinit smsc911x_drv_probe(struct platform_device *pdev)
1886 struct net_device *dev; 1886 struct net_device *dev;
1887 struct smsc911x_data *pdata; 1887 struct smsc911x_data *pdata;
1888 struct smsc911x_platform_config *config = pdev->dev.platform_data; 1888 struct smsc911x_platform_config *config = pdev->dev.platform_data;
1889 struct resource *res; 1889 struct resource *res, *irq_res;
1890 unsigned int intcfg = 0; 1890 unsigned int intcfg = 0;
1891 int res_size; 1891 int res_size, irq_flags;
1892 int retval; 1892 int retval;
1893 DECLARE_MAC_BUF(mac); 1893 DECLARE_MAC_BUF(mac);
1894 1894
@@ -1913,6 +1913,14 @@ static int __devinit smsc911x_drv_probe(struct platform_device *pdev)
1913 } 1913 }
1914 res_size = res->end - res->start; 1914 res_size = res->end - res->start;
1915 1915
1916 irq_res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
1917 if (!irq_res) {
1918 pr_warning("%s: Could not allocate irq resource.\n",
1919 SMSC_CHIPNAME);
1920 retval = -ENODEV;
1921 goto out_0;
1922 }
1923
1916 if (!request_mem_region(res->start, res_size, SMSC_CHIPNAME)) { 1924 if (!request_mem_region(res->start, res_size, SMSC_CHIPNAME)) {
1917 retval = -EBUSY; 1925 retval = -EBUSY;
1918 goto out_0; 1926 goto out_0;
@@ -1929,7 +1937,8 @@ static int __devinit smsc911x_drv_probe(struct platform_device *pdev)
1929 1937
1930 pdata = netdev_priv(dev); 1938 pdata = netdev_priv(dev);
1931 1939
1932 dev->irq = platform_get_irq(pdev, 0); 1940 dev->irq = irq_res->start;
1941 irq_flags = irq_res->flags & IRQF_TRIGGER_MASK;
1933 pdata->ioaddr = ioremap_nocache(res->start, res_size); 1942 pdata->ioaddr = ioremap_nocache(res->start, res_size);
1934 1943
1935 /* copy config parameters across to pdata */ 1944 /* copy config parameters across to pdata */
@@ -1962,8 +1971,8 @@ static int __devinit smsc911x_drv_probe(struct platform_device *pdev)
1962 smsc911x_reg_write(pdata, INT_EN, 0); 1971 smsc911x_reg_write(pdata, INT_EN, 0);
1963 smsc911x_reg_write(pdata, INT_STS, 0xFFFFFFFF); 1972 smsc911x_reg_write(pdata, INT_STS, 0xFFFFFFFF);
1964 1973
1965 retval = request_irq(dev->irq, smsc911x_irqhandler, IRQF_DISABLED, 1974 retval = request_irq(dev->irq, smsc911x_irqhandler,
1966 dev->name, dev); 1975 irq_flags | IRQF_DISABLED, dev->name, dev);
1967 if (retval) { 1976 if (retval) {
1968 SMSC_WARNING(PROBE, 1977 SMSC_WARNING(PROBE,
1969 "Unable to claim requested irq: %d", dev->irq); 1978 "Unable to claim requested irq: %d", dev->irq);