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

clk: qcom: kpss-xcc: Make use of the helper function devm_platform_ioremap_resource()

Use the devm_platform_ioremap_resource() helper instead of
calling platform_get_resource() and devm_ioremap_resource()
separately

Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
Link: https://lore.kernel.org/r/20210907084858.4101-1-caihuoqing@baidu.com
Signed-off-by: Stephen Boyd <sboyd@kernel.org>

authored by

Cai Huoqing and committed by
Stephen Boyd
17c774ab 437cbbb0

+1 -3
+1 -3
drivers/clk/qcom/kpss-xcc.c
··· 33 33 { 34 34 const struct of_device_id *id; 35 35 struct clk *clk; 36 - struct resource *res; 37 36 void __iomem *base; 38 37 const char *name; 39 38 ··· 40 41 if (!id) 41 42 return -ENODEV; 42 43 43 - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 44 - base = devm_ioremap_resource(&pdev->dev, res); 44 + base = devm_platform_ioremap_resource(pdev, 0); 45 45 if (IS_ERR(base)) 46 46 return PTR_ERR(base); 47 47