diff options
author | Yangtao Li <frank.li@vivo.com> | 2023-07-04 21:03:08 +0800 |
---|---|---|
committer | Sebastian Reichel <sre@kernel.org> | 2023-07-19 23:31:49 +0200 |
commit | 1a80588314caa933fbc1b295d16723086c7b797a (patch) | |
tree | 8aa2e89e22317359213b53b4712b2737ccb11ebd /drivers | |
parent | 19223ffa3d84f66ccb09a154dfa26cd40034595c (diff) |
power: reset: ocelot: Convert to devm_platform_ioremap_resource()
Use devm_platform_ioremap_resource() to simplify code.
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/power/reset/ocelot-reset.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/power/reset/ocelot-reset.c b/drivers/power/reset/ocelot-reset.c index 44c7730086e4..56be64decf54 100644 --- a/drivers/power/reset/ocelot-reset.c +++ b/drivers/power/reset/ocelot-reset.c @@ -69,8 +69,6 @@ static int ocelot_restart_handle(struct notifier_block *this, static int ocelot_reset_probe(struct platform_device *pdev) { struct ocelot_reset_context *ctx; - struct resource *res; - struct device *dev = &pdev->dev; int err; @@ -78,8 +76,7 @@ static int ocelot_reset_probe(struct platform_device *pdev) if (!ctx) return -ENOMEM; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - ctx->base = devm_ioremap_resource(dev, res); + ctx->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(ctx->base)) return PTR_ERR(ctx->base); |