summaryrefslogtreecommitdiffstats
path: root/drivers/clk/sifive
diff options
context:
space:
mode:
authorYang Li <yang.lee@linux.alibaba.com>2023-04-28 15:00:05 +0800
committerStephen Boyd <sboyd@kernel.org>2023-06-14 17:20:13 -0700
commita7a0c7d5502217e650d1e996520717212ee54fb9 (patch)
tree20bec9ee631a2f7de0981496c3abe315e3515273 /drivers/clk/sifive
parentac9a78681b921877518763ba0e89202254349d1b (diff)
downloadlinux-stable-a7a0c7d5502217e650d1e996520717212ee54fb9.tar.gz
linux-stable-a7a0c7d5502217e650d1e996520717212ee54fb9.tar.bz2
linux-stable-a7a0c7d5502217e650d1e996520717212ee54fb9.zip
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>
Diffstat (limited to 'drivers/clk/sifive')
-rw-r--r--drivers/clk/sifive/sifive-prci.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/clk/sifive/sifive-prci.c b/drivers/clk/sifive/sifive-prci.c
index 916d2fc28b9c..e317f3454e93 100644
--- a/drivers/clk/sifive/sifive-prci.c
+++ b/drivers/clk/sifive/sifive-prci.c
@@ -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);