reset: meson-audio-arb: Convert to devm_platform_ioremap_resource()
authorYangtao Li <frank.li@vivo.com>
Tue, 4 Jul 2023 12:02:06 +0000 (20:02 +0800)
committerPhilipp Zabel <p.zabel@pengutronix.de>
Tue, 28 Nov 2023 16:19:38 +0000 (17:19 +0100)
Use devm_platform_ioremap_resource() to simplify code.

Signed-off-by: Yangtao Li <frank.li@vivo.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20230704120211.38122-2-frank.li@vivo.com
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
drivers/reset/reset-meson-audio-arb.c

index 7e46dbc04998f456949865af97783938c7d92c23..7891d52fa899d87cdaed38234a2d4b7fdca5f01e 100644 (file)
@@ -139,7 +139,6 @@ static int meson_audio_arb_probe(struct platform_device *pdev)
        struct device *dev = &pdev->dev;
        const struct meson_audio_arb_match_data *data;
        struct meson_audio_arb_data *arb;
-       struct resource *res;
        int ret;
 
        data = of_device_get_match_data(dev);
@@ -155,8 +154,7 @@ static int meson_audio_arb_probe(struct platform_device *pdev)
        if (IS_ERR(arb->clk))
                return dev_err_probe(dev, PTR_ERR(arb->clk), "failed to get clock\n");
 
-       res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-       arb->regs = devm_ioremap_resource(dev, res);
+       arb->regs = devm_platform_ioremap_resource(pdev, 0);
        if (IS_ERR(arb->regs))
                return PTR_ERR(arb->regs);