diff options
author | John Crispin <john@openwrt.org> | 2016-01-02 11:44:08 +0000 |
---|---|---|
committer | John Crispin <john@openwrt.org> | 2016-01-02 11:44:08 +0000 |
commit | fb2d204ce49622a3707f1bf9402053bf632f6f58 (patch) | |
tree | da9523e22669ed8fec9752a3e66e90a31c7173e1 /target | |
parent | ef53dc754f613248898f9ee7fc210fd1241e77b0 (diff) | |
download | openwrt-fb2d204ce49622a3707f1bf9402053bf632f6f58.tar.gz openwrt-fb2d204ce49622a3707f1bf9402053bf632f6f58.tar.bz2 openwrt-fb2d204ce49622a3707f1bf9402053bf632f6f58.zip |
ralink: more esw_rt3050 fixes
the IRQ was not setup properly causing an oops
Signed-off-by: John Crispin <blogic@openwrt.org>
SVN-Revision: 48064
Diffstat (limited to 'target')
-rw-r--r-- | target/linux/ramips/patches-4.3/0514-net-mediatek-fix_esw.patch | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/target/linux/ramips/patches-4.3/0514-net-mediatek-fix_esw.patch b/target/linux/ramips/patches-4.3/0514-net-mediatek-fix_esw.patch new file mode 100644 index 0000000000..0ea4592483 --- /dev/null +++ b/target/linux/ramips/patches-4.3/0514-net-mediatek-fix_esw.patch @@ -0,0 +1,48 @@ +--- a/drivers/net/ethernet/mediatek/esw_rt3050.c ++++ b/drivers/net/ethernet/mediatek/esw_rt3050.c +@@ -16,6 +16,7 @@ + #include <linux/kernel.h> + #include <linux/platform_device.h> + #include <asm/mach-ralink/ralink_regs.h> ++#include <linux/of_irq.h> + + #include <linux/switch.h> + +@@ -1332,7 +1333,6 @@ + const __be32 *port_map, *reg_init; + struct switch_dev *swdev; + struct rt305x_esw *esw; +- struct resource *irq; + int ret; + + esw = devm_kzalloc(&pdev->dev, sizeof(*esw), GFP_KERNEL); +@@ -1340,7 +1340,7 @@ + return -ENOMEM; + + esw->dev = &pdev->dev; +- esw->irq = irq->start; ++ esw->irq = irq_of_parse_and_map(np, 0); + esw->base = devm_ioremap_resource(&pdev->dev, res); + if (!esw->base) + return -EADDRNOTAVAIL; +@@ -1365,7 +1365,7 @@ + ret = register_switch(swdev, NULL); + if (ret < 0) { + dev_err(&pdev->dev, "register_switch failed\n"); +- goto unmap_base; ++ return ret; + } + + platform_set_drvdata(pdev, esw); +@@ -1383,11 +1383,6 @@ + } + + return ret; +- +-unmap_base: +- iounmap(esw->base); +- kfree(esw); +- return ret; + } + + static int esw_remove(struct platform_device *pdev) |