mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-24 12:44:11 +08:00
clk: sifive: Use devm_platform_ioremap_resource()
Convert platform_get_resource(),devm_ioremap_resource() to a single call to devm_platform_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Yang Li <yang.lee@linux.alibaba.com> Link: https://lore.kernel.org/r/20230428070005.41192-1-yang.lee@linux.alibaba.com Signed-off-by: Stephen Boyd <sboyd@kernel.org>
This commit is contained in:
parent
ac9a78681b
commit
a7a0c7d550
@ -567,7 +567,6 @@ static int __prci_register_clocks(struct device *dev, struct __prci_data *pd,
|
||||
static int sifive_prci_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct device *dev = &pdev->dev;
|
||||
struct resource *res;
|
||||
struct __prci_data *pd;
|
||||
const struct prci_clk_desc *desc;
|
||||
int r;
|
||||
@ -578,8 +577,7 @@ static int sifive_prci_probe(struct platform_device *pdev)
|
||||
if (!pd)
|
||||
return -ENOMEM;
|
||||
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
pd->va = devm_ioremap_resource(dev, res);
|
||||
pd->va = devm_platform_ioremap_resource(pdev, 0);
|
||||
if (IS_ERR(pd->va))
|
||||
return PTR_ERR(pd->va);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user