summaryrefslogtreecommitdiff
path: root/drivers/soc/qcom
diff options
context:
space:
mode:
authorCai Huoqing <caihuoqing@baidu.com>2021-09-08 16:02:16 +0800
committerBjorn Andersson <bjorn.andersson@linaro.org>2021-09-21 17:41:49 -0500
commitf69a91e376695ae6048934c92f6b7eea6c51cd86 (patch)
treecd0c64ea9f6f32f8af790740ebee924ddcb55ab2 /drivers/soc/qcom
parenteb242d57aa6f93b702b15c40682f2775049c467d (diff)
soc: qcom: rpmh-rsc: Make use of the helper function devm_platform_ioremap_resource_byname()
Use the devm_platform_ioremap_resource_byname() helper instead of calling platform_get_resource_byname() and devm_ioremap_resource() separately Signed-off-by: Cai Huoqing <caihuoqing@baidu.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> Link: https://lore.kernel.org/r/20210908080216.1301-6-caihuoqing@baidu.com
Diffstat (limited to 'drivers/soc/qcom')
-rw-r--r--drivers/soc/qcom/rpmh-rsc.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/soc/qcom/rpmh-rsc.c b/drivers/soc/qcom/rpmh-rsc.c
index e749a2b285d8..3a12a482f6b2 100644
--- a/drivers/soc/qcom/rpmh-rsc.c
+++ b/drivers/soc/qcom/rpmh-rsc.c
@@ -910,7 +910,6 @@ static int rpmh_rsc_probe(struct platform_device *pdev)
{
struct device_node *dn = pdev->dev.of_node;
struct rsc_drv *drv;
- struct resource *res;
char drv_id[10] = {0};
int ret, irq;
u32 solver_config;
@@ -941,8 +940,7 @@ static int rpmh_rsc_probe(struct platform_device *pdev)
drv->name = dev_name(&pdev->dev);
snprintf(drv_id, ARRAY_SIZE(drv_id), "drv-%d", drv->id);
- res = platform_get_resource_byname(pdev, IORESOURCE_MEM, drv_id);
- base = devm_ioremap_resource(&pdev->dev, res);
+ base = devm_platform_ioremap_resource_byname(pdev, drv_id);
if (IS_ERR(base))
return PTR_ERR(base);