summaryrefslogtreecommitdiffstats
path: root/drivers/soc/qcom
diff options
context:
space:
mode:
authorYangtao Li <frank.li@vivo.com>2023-07-05 14:26:41 +0200
committerBjorn Andersson <andersson@kernel.org>2023-07-10 06:45:31 +0200
commit7bc1cfaee1f03008e8b1fd29e621cb50a9512263 (patch)
treec756f55bd4b2ddad8f7bd1d366e1a55b165fdabb /drivers/soc/qcom
parentdt-bindings: firmware: qcom,scm: Allow interconnect on SC8280XP (diff)
downloadlinux-7bc1cfaee1f03008e8b1fd29e621cb50a9512263.tar.xz
linux-7bc1cfaee1f03008e8b1fd29e621cb50a9512263.zip
soc: qcom: spm: Convert to devm_platform_ioremap_resource()
Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li <frank.li@vivo.com> Link: https://lore.kernel.org/r/20230705122644.32236-3-frank.li@vivo.com Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Diffstat (limited to 'drivers/soc/qcom')
-rw-r--r--drivers/soc/qcom/spm.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/soc/qcom/spm.c b/drivers/soc/qcom/spm.c
index a6cbeb40831b..bab4897267b9 100644
--- a/drivers/soc/qcom/spm.c
+++ b/drivers/soc/qcom/spm.c
@@ -275,15 +275,13 @@ static int spm_dev_probe(struct platform_device *pdev)
{
const struct of_device_id *match_id;
struct spm_driver_data *drv;
- struct resource *res;
void __iomem *addr;
drv = devm_kzalloc(&pdev->dev, sizeof(*drv), GFP_KERNEL);
if (!drv)
return -ENOMEM;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- drv->reg_base = devm_ioremap_resource(&pdev->dev, res);
+ drv->reg_base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(drv->reg_base))
return PTR_ERR(drv->reg_base);