summaryrefslogtreecommitdiff
path: root/drivers/firmware/tegra/bpmp-tegra210.c
diff options
context:
space:
mode:
authorCai Huoqing <caihuoqing@baidu.com>2021-09-08 13:56:23 +0300
committerThierry Reding <treding@nvidia.com>2021-10-07 21:52:24 +0300
commitf11c34bddf8cd2a3107a7d11b6446c66deda9590 (patch)
tree100d58c9fbd0022dcb9412a76bda165bd0da7684 /drivers/firmware/tegra/bpmp-tegra210.c
parent06c2d9a078abe784fd9fd0f1534e318e827712b4 (diff)
downloadlinux-f11c34bddf8cd2a3107a7d11b6446c66deda9590.tar.xz
firmware: tegra: bpmp: Use devm_platform_ioremap_resource()
Use the devm_platform_ioremap_resource() helper instead of calling platform_get_resource() and devm_ioremap_resource() separately. Signed-off-by: Cai Huoqing <caihuoqing@baidu.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'drivers/firmware/tegra/bpmp-tegra210.c')
-rw-r--r--drivers/firmware/tegra/bpmp-tegra210.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/firmware/tegra/bpmp-tegra210.c b/drivers/firmware/tegra/bpmp-tegra210.c
index c32754055c60..c9c830f658c3 100644
--- a/drivers/firmware/tegra/bpmp-tegra210.c
+++ b/drivers/firmware/tegra/bpmp-tegra210.c
@@ -162,7 +162,6 @@ static int tegra210_bpmp_init(struct tegra_bpmp *bpmp)
{
struct platform_device *pdev = to_platform_device(bpmp->dev);
struct tegra210_bpmp *priv;
- struct resource *res;
unsigned int i;
int err;
@@ -172,13 +171,11 @@ static int tegra210_bpmp_init(struct tegra_bpmp *bpmp)
bpmp->priv = priv;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- priv->atomics = devm_ioremap_resource(&pdev->dev, res);
+ priv->atomics = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(priv->atomics))
return PTR_ERR(priv->atomics);
- res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
- priv->arb_sema = devm_ioremap_resource(&pdev->dev, res);
+ priv->arb_sema = devm_platform_ioremap_resource(pdev, 1);
if (IS_ERR(priv->arb_sema))
return PTR_ERR(priv->arb_sema);