Skip to content

Commit fdbd695

Browse files
Md Sadre Alamwsakernel
authored andcommitted
i2c: qcom-cci: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 <[email protected]> Acked-by: Robert Foss <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
1 parent 06e9895 commit fdbd695

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/i2c/busses/i2c-qcom-cci.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -581,8 +581,7 @@ static int cci_probe(struct platform_device *pdev)
581581

582582
/* Memory */
583583

584-
r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
585-
cci->base = devm_ioremap_resource(dev, r);
584+
cci->base = devm_platform_get_and_ioremap_resource(pdev, 0, &r);
586585
if (IS_ERR(cci->base))
587586
return PTR_ERR(cci->base);
588587

0 commit comments

Comments
 (0)