Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Sergio Paracuellos and committed by
Bartosz Golaszewski
f7d619e9 6d50b790

+4 -3
+4 -3
drivers/gpio/gpio-mt7621.c
··· 9 9 #include <linux/interrupt.h> 10 10 #include <linux/io.h> 11 11 #include <linux/module.h> 12 - #include <linux/of_irq.h> 13 12 #include <linux/platform_device.h> 14 13 #include <linux/spinlock.h> 15 14 ··· 289 290 mediatek_gpio_probe(struct platform_device *pdev) 290 291 { 291 292 struct device *dev = &pdev->dev; 292 - struct device_node *np = dev->of_node; 293 293 struct mtk *mtk; 294 294 int i; 295 295 int ret; ··· 301 303 if (IS_ERR(mtk->base)) 302 304 return PTR_ERR(mtk->base); 303 305 304 - mtk->gpio_irq = irq_of_parse_and_map(np, 0); 306 + mtk->gpio_irq = platform_get_irq(pdev, 0); 307 + if (mtk->gpio_irq < 0) 308 + return mtk->gpio_irq; 309 + 305 310 mtk->dev = dev; 306 311 platform_set_drvdata(pdev, mtk); 307 312