Merge tag 'gpio-updates-for-v6.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel...
[linux-block.git] / drivers / gpio / gpio-mt7621.c
index f163f5ca857beb24d7c3eafffef482a6bb9def6b..93facbebb80efadbdd3fb4500e0db14936287f1a 100644 (file)
@@ -9,7 +9,6 @@
 #include <linux/interrupt.h>
 #include <linux/io.h>
 #include <linux/module.h>
-#include <linux/of_irq.h>
 #include <linux/platform_device.h>
 #include <linux/spinlock.h>
 
@@ -299,7 +298,6 @@ static int
 mediatek_gpio_probe(struct platform_device *pdev)
 {
        struct device *dev = &pdev->dev;
-       struct device_node *np = dev->of_node;
        struct mtk *mtk;
        int i;
        int ret;
@@ -312,7 +310,10 @@ mediatek_gpio_probe(struct platform_device *pdev)
        if (IS_ERR(mtk->base))
                return PTR_ERR(mtk->base);
 
-       mtk->gpio_irq = irq_of_parse_and_map(np, 0);
+       mtk->gpio_irq = platform_get_irq(pdev, 0);
+       if (mtk->gpio_irq < 0)
+               return mtk->gpio_irq;
+
        mtk->dev = dev;
        platform_set_drvdata(pdev, mtk);