1 --- a/drivers/net/ethernet/mediatek/esw_rt3050.c
2 +++ b/drivers/net/ethernet/mediatek/esw_rt3050.c
4 #include <linux/kernel.h>
5 #include <linux/platform_device.h>
6 #include <asm/mach-ralink/ralink_regs.h>
7 +#include <linux/of_irq.h>
9 #include <linux/switch.h>
11 @@ -1332,7 +1333,6 @@ static int esw_probe(struct platform_dev
12 const __be32 *port_map, *reg_init;
13 struct switch_dev *swdev;
14 struct rt305x_esw *esw;
15 - struct resource *irq;
18 esw = devm_kzalloc(&pdev->dev, sizeof(*esw), GFP_KERNEL);
19 @@ -1340,7 +1340,7 @@ static int esw_probe(struct platform_dev
22 esw->dev = &pdev->dev;
23 - esw->irq = irq->start;
24 + esw->irq = irq_of_parse_and_map(np, 0);
25 esw->base = devm_ioremap_resource(&pdev->dev, res);
27 return -EADDRNOTAVAIL;
28 @@ -1365,7 +1365,7 @@ static int esw_probe(struct platform_dev
29 ret = register_switch(swdev, NULL);
31 dev_err(&pdev->dev, "register_switch failed\n");
36 platform_set_drvdata(pdev, esw);
37 @@ -1383,11 +1383,6 @@ static int esw_probe(struct platform_dev
48 static int esw_remove(struct platform_device *pdev)