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>
This commit is contained in:
committed by
Sebastian Reichel
parent
19223ffa3d
commit
1a80588314
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user