clk: bm1880: Convert to devm_platform_ioremap_resource()
Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li <frank.li@vivo.com> Link: https://lore.kernel.org/r/20230705065313.67043-4-frank.li@vivo.com Signed-off-by: Stephen Boyd <sboyd@kernel.org>
This commit is contained in:
parent
495093ef85
commit
3b392629e2
|
@ -876,16 +876,13 @@ static int bm1880_clk_probe(struct platform_device *pdev)
|
||||||
struct bm1880_clock_data *clk_data;
|
struct bm1880_clock_data *clk_data;
|
||||||
void __iomem *pll_base, *sys_base;
|
void __iomem *pll_base, *sys_base;
|
||||||
struct device *dev = &pdev->dev;
|
struct device *dev = &pdev->dev;
|
||||||
struct resource *res;
|
|
||||||
int num_clks, i;
|
int num_clks, i;
|
||||||
|
|
||||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
pll_base = devm_platform_ioremap_resource(pdev, 0);
|
||||||
pll_base = devm_ioremap_resource(&pdev->dev, res);
|
|
||||||
if (IS_ERR(pll_base))
|
if (IS_ERR(pll_base))
|
||||||
return PTR_ERR(pll_base);
|
return PTR_ERR(pll_base);
|
||||||
|
|
||||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
|
sys_base = devm_platform_ioremap_resource(pdev, 1);
|
||||||
sys_base = devm_ioremap_resource(&pdev->dev, res);
|
|
||||||
if (IS_ERR(sys_base))
|
if (IS_ERR(sys_base))
|
||||||
return PTR_ERR(sys_base);
|
return PTR_ERR(sys_base);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue