Skip to content

Commit 0cc9841

Browse files
Yang Liwsakernel
authored andcommitted
i2c: xiic: Use devm_platform_get_and_ioremap_resource()
According to commit 890cc39 ("drivers: provide 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: Yang Li <yang.lee@linux.alibaba.com> Reviewed-by: Michal Simek <michal.simek@amd.com> Signed-off-by: Wolfram Sang <wsa@kernel.org>
1 parent d8a5a92 commit 0cc9841

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

drivers/i2c/busses/i2c-xiic.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1233,8 +1233,7 @@ static int xiic_i2c_probe(struct platform_device *pdev)
12331233
i2c->quirks = data->quirks;
12341234
}
12351235

1236-
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
1237-
i2c->base = devm_ioremap_resource(&pdev->dev, res);
1236+
i2c->base = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
12381237
if (IS_ERR(i2c->base))
12391238
return PTR_ERR(i2c->base);
12401239

0 commit comments

Comments
 (0)