Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

clk: mediatek: mt6779: use devm_platform_ioremap_resource() to simplify code

Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Link: https://lkml.kernel.org/r/20191015121035.24736-1-yuehaibing@huawei.com
Signed-off-by: Stephen Boyd <sboyd@kernel.org>

authored by

YueHaibing and committed by
Stephen Boyd
71ae8141 73c3bf70

+1 -2
+1 -2
drivers/clk/mediatek/clk-mt6779.c
··· 1225 1225 1226 1226 static int clk_mt6779_top_probe(struct platform_device *pdev) 1227 1227 { 1228 - struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 1229 1228 void __iomem *base; 1230 1229 struct clk_onecell_data *clk_data; 1231 1230 struct device_node *node = pdev->dev.of_node; 1232 1231 1233 - base = devm_ioremap_resource(&pdev->dev, res); 1232 + base = devm_platform_ioremap_resource(pdev, 0); 1234 1233 if (IS_ERR(base)) 1235 1234 return PTR_ERR(base); 1236 1235