diff options
author | Lv Ruyi <lv.ruyi@zte.com.cn> | 2022-04-18 04:02:38 +0200 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2022-04-23 00:01:55 +0200 |
commit | 90c0659ed38a9d4709c156f3f7ea900f9afe873f (patch) | |
tree | 44215cebdb0cbe5608c5cdbef76307f3890378ac /drivers/pinctrl/pinctrl-thunderbay.c | |
parent | pinctrl: ingenic: Garbage-collect code paths for SoCs disabled by config (diff) | |
download | linux-90c0659ed38a9d4709c156f3f7ea900f9afe873f.tar.xz linux-90c0659ed38a9d4709c156f3f7ea900f9afe873f.zip |
pinctrl: thunderbay: Use devm_platform_ioremap_resource()
Use the devm_platform_ioremap_resource() helper instead of calling
platform_get_resource() and devm_ioremap_resource() separately.Make the
code simpler without functional changes.
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Lv Ruyi <lv.ruyi@zte.com.cn>
Link: https://lore.kernel.org/r/20220418020238.2556989-1-lv.ruyi@zte.com.cn
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/pinctrl-thunderbay.c')
-rw-r--r-- | drivers/pinctrl/pinctrl-thunderbay.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/pinctrl/pinctrl-thunderbay.c b/drivers/pinctrl/pinctrl-thunderbay.c index 79d44bca039e..9328b17485cf 100644 --- a/drivers/pinctrl/pinctrl-thunderbay.c +++ b/drivers/pinctrl/pinctrl-thunderbay.c @@ -1229,7 +1229,6 @@ static int thunderbay_pinctrl_probe(struct platform_device *pdev) const struct of_device_id *of_id; struct device *dev = &pdev->dev; struct thunderbay_pinctrl *tpc; - struct resource *iomem; int ret; of_id = of_match_node(thunderbay_pinctrl_match, pdev->dev.of_node); @@ -1243,11 +1242,7 @@ static int thunderbay_pinctrl_probe(struct platform_device *pdev) tpc->dev = dev; tpc->soc = of_id->data; - iomem = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!iomem) - return -ENXIO; - - tpc->base0 = devm_ioremap_resource(dev, iomem); + tpc->base0 = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(tpc->base0)) return PTR_ERR(tpc->base0); |