mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-01 08:04:22 +08:00
pmdomain: mediatek: Use devm_platform_ioremap_resource() in init_scp()
A wrapper function is available since the commit 7945f929f1
("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: Markus Elfring <elfring@users.sourceforge.net>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/6e397bf2-1d45-434f-8619-58a737a138e3@web.de
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
This commit is contained in:
parent
ce816e0bac
commit
a0691f280b
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user