Skip to content

Commit b15eb80

Browse files
bbkzzwsakernel
authored andcommitted
i2c: s3c2410: 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: Yangtao Li <[email protected]> Reviewed-by: Andi Shyti <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
1 parent 3735e43 commit b15eb80

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

drivers/i2c/busses/i2c-s3c2410.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1033,9 +1033,7 @@ static int s3c24xx_i2c_probe(struct platform_device *pdev)
10331033
dev_dbg(&pdev->dev, "clock source %p\n", i2c->clk);
10341034

10351035
/* map the registers */
1036-
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
1037-
i2c->regs = devm_ioremap_resource(&pdev->dev, res);
1038-
1036+
i2c->regs = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
10391037
if (IS_ERR(i2c->regs))
10401038
return PTR_ERR(i2c->regs);
10411039

0 commit comments

Comments
 (0)