Commit a0691f28 authored by Markus Elfring's avatar Markus Elfring Committed by Ulf Hansson

pmdomain: mediatek: Use devm_platform_ioremap_resource() in init_scp()

A wrapper function is available since the commit 7945f929
("drivers: provide devm_platform_ioremap_resource()").

* Thus reuse existing functionality instead of keeping duplicate source code.

* Delete a local variable which became unnecessary with this refactoring.

This issue was transformed by using the Coccinelle software.
Signed-off-by: default avatarMarkus Elfring <elfring@users.sourceforge.net>
Reviewed-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: default avatarAngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/6e397bf2-1d45-434f-8619-58a737a138e3@web.deSigned-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent ce816e0b
......@@ -425,7 +425,6 @@ static struct scp *init_scp(struct platform_device *pdev,
bool bus_prot_reg_update)
{
struct genpd_onecell_data *pd_data;
struct resource *res;
int i, j;
struct scp *scp;
struct clk *clk[CLK_MAX];
......@@ -441,8 +440,7 @@ static struct scp *init_scp(struct platform_device *pdev,
scp->dev = &pdev->dev;
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
scp->base = devm_ioremap_resource(&pdev->dev, res);
scp->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(scp->base))
return ERR_CAST(scp->base);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment