diff mbox series

[4/7] mfd: exynos-lpass: Convert to devm_platform_ioremap_resource()

Message ID 20230706113939.1178-4-frank.li@vivo.com
State New
Headers show
Series None | expand

Commit Message

李扬韬 July 6, 2023, 11:39 a.m. UTC
Use devm_platform_ioremap_resource() to simplify code.

Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
 drivers/mfd/exynos-lpass.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Lee Jones July 13, 2023, 1:41 p.m. UTC | #1
On Thu, 06 Jul 2023, Yangtao Li wrote:

> Use devm_platform_ioremap_resource() to simplify code.
> 
> Signed-off-by: Yangtao Li <frank.li@vivo.com>
> ---
>  drivers/mfd/exynos-lpass.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)

Applied, thanks
diff mbox series

Patch

diff --git a/drivers/mfd/exynos-lpass.c b/drivers/mfd/exynos-lpass.c
index 166cd21088cd..1506d8d352b1 100644
--- a/drivers/mfd/exynos-lpass.c
+++ b/drivers/mfd/exynos-lpass.c
@@ -109,14 +109,12 @@  static int exynos_lpass_probe(struct platform_device *pdev)
 	struct device *dev = &pdev->dev;
 	struct exynos_lpass *lpass;
 	void __iomem *base_top;
-	struct resource *res;
 
 	lpass = devm_kzalloc(dev, sizeof(*lpass), GFP_KERNEL);
 	if (!lpass)
 		return -ENOMEM;
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	base_top = devm_ioremap_resource(dev, res);
+	base_top = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(base_top))
 		return PTR_ERR(base_top);