Skip to content

Commit 2899347

Browse files
Qilong Zhangandersson
authored andcommitted
soc: qcom: llcc: use 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: Zhang Qilong <zhangqilong3@huawei.com> Link: https://lore.kernel.org/r/20200916111517.99670-1-zhangqilong3@huawei.com Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
1 parent ba34f97 commit 2899347

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

drivers/soc/qcom/llcc-qcom.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,6 @@ static int qcom_llcc_remove(struct platform_device *pdev)
387387
static struct regmap *qcom_llcc_init_mmio(struct platform_device *pdev,
388388
const char *name)
389389
{
390-
struct resource *res;
391390
void __iomem *base;
392391
struct regmap_config llcc_regmap_config = {
393392
.reg_bits = 32,
@@ -396,11 +395,7 @@ static struct regmap *qcom_llcc_init_mmio(struct platform_device *pdev,
396395
.fast_io = true,
397396
};
398397

399-
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, name);
400-
if (!res)
401-
return ERR_PTR(-ENODEV);
402-
403-
base = devm_ioremap_resource(&pdev->dev, res);
398+
base = devm_platform_ioremap_resource_byname(pdev, name);
404399
if (IS_ERR(base))
405400
return ERR_CAST(base);
406401

0 commit comments

Comments
 (0)