* [PATCH -next] pinctrl: mediatek: use devm_platform_ioremap_resource() to simplify code
@ 2019-10-16 14:10 YueHaibing
2019-10-24 12:03 ` Linus Walleij
0 siblings, 1 reply; 2+ messages in thread
From: YueHaibing @ 2019-10-16 14:10 UTC (permalink / raw)
To: sean.wang, linus.walleij, matthias.bgg
Cc: linux-mediatek, linux-gpio, linux-arm-kernel, linux-kernel, YueHaibing
Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
drivers/pinctrl/mediatek/pinctrl-mtk-common.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
index 53f52b9..67f8444 100644
--- a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
+++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
@@ -982,7 +982,6 @@ static const struct mtk_eint_xt mtk_eint_xt = {
static int mtk_eint_init(struct mtk_pinctrl *pctl, struct platform_device *pdev)
{
struct device_node *np = pdev->dev.of_node;
- struct resource *res;
if (!of_property_read_bool(np, "interrupt-controller"))
return -ENODEV;
@@ -991,8 +990,7 @@ static int mtk_eint_init(struct mtk_pinctrl *pctl, struct platform_device *pdev)
if (!pctl->eint)
return -ENOMEM;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- pctl->eint->base = devm_ioremap_resource(&pdev->dev, res);
+ pctl->eint->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(pctl->eint->base))
return PTR_ERR(pctl->eint->base);
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH -next] pinctrl: mediatek: use devm_platform_ioremap_resource() to simplify code
2019-10-16 14:10 [PATCH -next] pinctrl: mediatek: use devm_platform_ioremap_resource() to simplify code YueHaibing
@ 2019-10-24 12:03 ` Linus Walleij
0 siblings, 0 replies; 2+ messages in thread
From: Linus Walleij @ 2019-10-24 12:03 UTC (permalink / raw)
To: YueHaibing
Cc: Sean Wang, Matthias Brugger,
moderated list:ARM/Mediatek SoC support,
open list:GPIO SUBSYSTEM, Linux ARM, linux-kernel
On Wed, Oct 16, 2019 at 4:11 PM YueHaibing <yuehaibing@huawei.com> wrote:
> Use devm_platform_ioremap_resource() to simplify the code a bit.
> This is detected by coccinelle.
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Patch applied.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-10-24 12:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-16 14:10 [PATCH -next] pinctrl: mediatek: use devm_platform_ioremap_resource() to simplify code YueHaibing
2019-10-24 12:03 ` Linus Walleij
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).