[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210201151245.21845-5-alexandru.ardelean@analog.com>
Date: Mon, 1 Feb 2021 17:12:45 +0200
From: Alexandru Ardelean <alexandru.ardelean@...log.com>
To: <linux-clk@...r.kernel.org>, <devicetree@...r.kernel.org>,
<linux-kernel@...r.kernel.org>
CC: <mturquette@...libre.com>, <sboyd@...nel.org>,
<robh+dt@...nel.org>, <lars@...afoo.de>,
<linux-fpga@...r.kernel.org>, <mdf@...nel.org>,
<ardeleanalex@...il.com>,
Alexandru Ardelean <alexandru.ardelean@...log.com>
Subject: [PATCH v3 4/4] clk: axi-clkgen: use devm_platform_ioremap_resource() short-hand
No major functional change. Noticed while checking the driver code that
this could be used.
Saves two lines.
Signed-off-by: Alexandru Ardelean <alexandru.ardelean@...log.com>
---
drivers/clk/clk-axi-clkgen.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/clk/clk-axi-clkgen.c b/drivers/clk/clk-axi-clkgen.c
index 9d1b0fc56c73..ac6ff736ac8f 100644
--- a/drivers/clk/clk-axi-clkgen.c
+++ b/drivers/clk/clk-axi-clkgen.c
@@ -510,7 +510,6 @@ static int axi_clkgen_probe(struct platform_device *pdev)
struct clk_init_data init;
const char *parent_names[2];
const char *clk_name;
- struct resource *mem;
unsigned int i;
int ret;
@@ -522,8 +521,7 @@ static int axi_clkgen_probe(struct platform_device *pdev)
if (!axi_clkgen)
return -ENOMEM;
- mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- axi_clkgen->base = devm_ioremap_resource(&pdev->dev, mem);
+ axi_clkgen->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(axi_clkgen->base))
return PTR_ERR(axi_clkgen->base);
--
2.17.1
Powered by blists - more mailing lists