summaryrefslogtreecommitdiff
path: root/drivers/gpio/gpio-mt7621.c
diff options
context:
space:
mode:
authorSergio Paracuellos <sergio.paracuellos@gmail.com>2022-09-13 19:46:39 +0300
committerBartosz Golaszewski <brgl@bgdev.pl>2022-09-14 15:23:51 +0300
commitf7d619e9ab851eb89ab50c9265504ed732d5bee2 (patch)
treebd3664dcc90c0cb66e0bd886dba73ffb20b99fc4 /drivers/gpio/gpio-mt7621.c
parent6d50b79051edc298aba7f60184d9b2fb673f0628 (diff)
downloadlinux-f7d619e9ab851eb89ab50c9265504ed732d5bee2.tar.xz
gpio: mt7621: Switch to use platform_get_irq() function
Mt7621 SoC GPIO driver is a platform driver so we can directly use 'platform_get_irq' instead of 'irq_of_parse_and_map'. Tested-by: Arınç ÜNAL <arinc.unal@arinc9.com> Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
Diffstat (limited to 'drivers/gpio/gpio-mt7621.c')
-rw-r--r--drivers/gpio/gpio-mt7621.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/gpio/gpio-mt7621.c b/drivers/gpio/gpio-mt7621.c
index d8a26e503ca5..340d17a5b6ec 100644
--- a/drivers/gpio/gpio-mt7621.c
+++ b/drivers/gpio/gpio-mt7621.c
@@ -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>
@@ -290,7 +289,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;
@@ -303,7 +301,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);