Commit 17c774ab authored by Cai Huoqing's avatar Cai Huoqing Committed by Stephen Boyd

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: default avatarCai Huoqing <caihuoqing@baidu.com>
Link: https://lore.kernel.org/r/20210907084858.4101-1-caihuoqing@baidu.comSigned-off-by: default avatarStephen Boyd <sboyd@kernel.org>
parent 437cbbb0
...@@ -33,7 +33,6 @@ static int kpss_xcc_driver_probe(struct platform_device *pdev) ...@@ -33,7 +33,6 @@ static int kpss_xcc_driver_probe(struct platform_device *pdev)
{ {
const struct of_device_id *id; const struct of_device_id *id;
struct clk *clk; struct clk *clk;
struct resource *res;
void __iomem *base; void __iomem *base;
const char *name; const char *name;
...@@ -41,8 +40,7 @@ static int kpss_xcc_driver_probe(struct platform_device *pdev) ...@@ -41,8 +40,7 @@ static int kpss_xcc_driver_probe(struct platform_device *pdev)
if (!id) if (!id)
return -ENODEV; return -ENODEV;
res = platform_get_resource(pdev, IORESOURCE_MEM, 0); base = devm_platform_ioremap_resource(pdev, 0);
base = devm_ioremap_resource(&pdev->dev, res);
if (IS_ERR(base)) if (IS_ERR(base))
return PTR_ERR(base); return PTR_ERR(base);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment