Skip to content

Commit bcf09d7

Browse files
Md Sadre Alammiquelraynal
authored andcommitted
mtd: nand: raw: qcom_nandc: Use devm_platform_get_and_ioremap_resource()
Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Md Sadre Alam <quic_mdalam@quicinc.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/linux-mtd/20230306144141.15360-1-quic_mdalam@quicinc.com
1 parent 434b835 commit bcf09d7

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

drivers/mtd/nand/raw/qcom_nandc.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3269,8 +3269,7 @@ static int qcom_nandc_probe(struct platform_device *pdev)
32693269
if (ret)
32703270
return ret;
32713271

3272-
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
3273-
nandc->base = devm_ioremap_resource(dev, res);
3272+
nandc->base = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
32743273
if (IS_ERR(nandc->base))
32753274
return PTR_ERR(nandc->base);
32763275

0 commit comments

Comments
 (0)