diff options
author | Yangtao Li <frank.li@vivo.com> | 2023-07-04 15:02:09 +0300 |
---|---|---|
committer | Philipp Zabel <p.zabel@pengutronix.de> | 2023-11-28 19:19:39 +0300 |
commit | ac53e621d8024848ad8ab16e56aee763eeabe233 (patch) | |
tree | a00c8431169ef098be94cc99a5e562bb1e72e54b /drivers/reset | |
parent | 49994d704d39bca20f15b4af125441c59520e887 (diff) | |
download | linux-ac53e621d8024848ad8ab16e56aee763eeabe233.tar.xz |
reset: simple: Convert to devm_platform_get_and_ioremap_resource()
Convert platform_get_resource(), devm_ioremap_resource() to a single
call to devm_platform_get_and_ioremap_resource(), as this is exactly
what this function does.
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Link: https://lore.kernel.org/r/20230704120211.38122-5-frank.li@vivo.com
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Diffstat (limited to 'drivers/reset')
-rw-r--r-- | drivers/reset/reset-simple.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/reset/reset-simple.c b/drivers/reset/reset-simple.c index 7ea5adbf2097..818cabcc9fb7 100644 --- a/drivers/reset/reset-simple.c +++ b/drivers/reset/reset-simple.c @@ -169,8 +169,7 @@ static int reset_simple_probe(struct platform_device *pdev) if (!data) return -ENOMEM; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - membase = devm_ioremap_resource(dev, res); + membase = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(membase)) return PTR_ERR(membase); |