diff options
author | YueHaibing <yuehaibing@huawei.com> | 2019-10-16 16:12:17 +0200 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2019-10-24 14:04:13 +0200 |
commit | fa679767addededcff5b35fadb95028542e3ff0a (patch) | |
tree | 3c69bea27ff59f793789316695473176c6e02109 /drivers/pinctrl/mvebu/pinctrl-orion.c | |
parent | pinctrl: mediatek: use devm_platform_ioremap_resource() to simplify code (diff) | |
download | linux-fa679767addededcff5b35fadb95028542e3ff0a.tar.xz linux-fa679767addededcff5b35fadb95028542e3ff0a.zip |
pinctrl: mvebu: use devm_platform_ioremap_resource() to simplify code
Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Link: https://lore.kernel.org/r/20191016141217.21520-1-yuehaibing@huawei.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/mvebu/pinctrl-orion.c')
-rw-r--r-- | drivers/pinctrl/mvebu/pinctrl-orion.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/pinctrl/mvebu/pinctrl-orion.c b/drivers/pinctrl/mvebu/pinctrl-orion.c index 29bb9d8cbbb5..cc97d270be61 100644 --- a/drivers/pinctrl/mvebu/pinctrl-orion.c +++ b/drivers/pinctrl/mvebu/pinctrl-orion.c @@ -220,17 +220,14 @@ static int orion_pinctrl_probe(struct platform_device *pdev) { const struct of_device_id *match = of_match_device(orion_pinctrl_of_match, &pdev->dev); - struct resource *res; pdev->dev.platform_data = (void*)match->data; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - mpp_base = devm_ioremap_resource(&pdev->dev, res); + mpp_base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(mpp_base)) return PTR_ERR(mpp_base); - res = platform_get_resource(pdev, IORESOURCE_MEM, 1); - high_mpp_base = devm_ioremap_resource(&pdev->dev, res); + high_mpp_base = devm_platform_ioremap_resource(pdev, 1); if (IS_ERR(high_mpp_base)) return PTR_ERR(high_mpp_base); |