summaryrefslogtreecommitdiffstats
path: root/drivers/power
diff options
context:
space:
mode:
authorYangtao Li <frank.li@vivo.com>2023-07-04 15:03:08 +0200
committerSebastian Reichel <sre@kernel.org>2023-07-19 23:31:49 +0200
commit1a80588314caa933fbc1b295d16723086c7b797a (patch)
tree8aa2e89e22317359213b53b4712b2737ccb11ebd /drivers/power
parentpower: reset: msm: Convert to devm_platform_ioremap_resource() (diff)
downloadlinux-1a80588314caa933fbc1b295d16723086c7b797a.tar.xz
linux-1a80588314caa933fbc1b295d16723086c7b797a.zip
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/power')
-rw-r--r--drivers/power/reset/ocelot-reset.c5
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);