linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] pinctrl: k210: Make (p)clk local to k210_fpioa_probe()
@ 2024-09-04  9:08 Geert Uytterhoeven
  2024-09-05  0:40 ` Damien Le Moal
  2024-09-23  9:06 ` Linus Walleij
  0 siblings, 2 replies; 3+ messages in thread
From: Geert Uytterhoeven @ 2024-09-04  9:08 UTC (permalink / raw)
  To: Damien Le Moal, Linus Walleij; +Cc: linux-riscv, linux-gpio, Geert Uytterhoeven

There were never any users of k210_fpioa_data.clk and
k210_fpioa_data.pclk outside k210_fpioa_probe().

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 drivers/pinctrl/pinctrl-k210.c | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/drivers/pinctrl/pinctrl-k210.c b/drivers/pinctrl/pinctrl-k210.c
index 0f6b55fec31de700..caf20215aaba5e9b 100644
--- a/drivers/pinctrl/pinctrl-k210.c
+++ b/drivers/pinctrl/pinctrl-k210.c
@@ -96,8 +96,6 @@ struct k210_fpioa_data {
 	struct k210_fpioa __iomem *fpioa;
 	struct regmap *sysctl_map;
 	u32 power_offset;
-	struct clk *clk;
-	struct clk *pclk;
 };
 
 #define K210_PIN_NAME(i)	("IO_" #i)
@@ -925,6 +923,7 @@ static int k210_fpioa_probe(struct platform_device *pdev)
 	struct device *dev = &pdev->dev;
 	struct device_node *np = dev->of_node;
 	struct k210_fpioa_data *pdata;
+	struct clk *clk, *pclk;
 
 	dev_info(dev, "K210 FPIOA pin controller\n");
 
@@ -939,13 +938,13 @@ static int k210_fpioa_probe(struct platform_device *pdev)
 	if (IS_ERR(pdata->fpioa))
 		return PTR_ERR(pdata->fpioa);
 
-	pdata->clk = devm_clk_get_enabled(dev, "ref");
-	if (IS_ERR(pdata->clk))
-		return PTR_ERR(pdata->clk);
+	clk = devm_clk_get_enabled(dev, "ref");
+	if (IS_ERR(clk))
+		return PTR_ERR(clk);
 
-	pdata->pclk = devm_clk_get_optional_enabled(dev, "pclk");
-	if (IS_ERR(pdata->pclk))
-		return PTR_ERR(pdata->pclk);
+	pclk = devm_clk_get_optional_enabled(dev, "pclk");
+	if (IS_ERR(pclk))
+		return PTR_ERR(pclk);
 
 	pdata->sysctl_map =
 		syscon_regmap_lookup_by_phandle_args(np,
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] pinctrl: k210: Make (p)clk local to k210_fpioa_probe()
  2024-09-04  9:08 [PATCH] pinctrl: k210: Make (p)clk local to k210_fpioa_probe() Geert Uytterhoeven
@ 2024-09-05  0:40 ` Damien Le Moal
  2024-09-23  9:06 ` Linus Walleij
  1 sibling, 0 replies; 3+ messages in thread
From: Damien Le Moal @ 2024-09-05  0:40 UTC (permalink / raw)
  To: Geert Uytterhoeven, Linus Walleij; +Cc: linux-riscv, linux-gpio

On 2024/09/04 18:08, Geert Uytterhoeven wrote:
> There were never any users of k210_fpioa_data.clk and
> k210_fpioa_data.pclk outside k210_fpioa_probe().
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>

Looks OK to me.

Reviewed-by: Damien Le Moal <dlemoal@kernel.org>

-- 
Damien Le Moal
Western Digital Research


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] pinctrl: k210: Make (p)clk local to k210_fpioa_probe()
  2024-09-04  9:08 [PATCH] pinctrl: k210: Make (p)clk local to k210_fpioa_probe() Geert Uytterhoeven
  2024-09-05  0:40 ` Damien Le Moal
@ 2024-09-23  9:06 ` Linus Walleij
  1 sibling, 0 replies; 3+ messages in thread
From: Linus Walleij @ 2024-09-23  9:06 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: Damien Le Moal, linux-riscv, linux-gpio

On Wed, Sep 4, 2024 at 11:08 AM Geert Uytterhoeven
<geert+renesas@glider.be> wrote:

> There were never any users of k210_fpioa_data.clk and
> k210_fpioa_data.pclk outside k210_fpioa_probe().
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>

Patch applied!

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-09-23  9:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-04  9:08 [PATCH] pinctrl: k210: Make (p)clk local to k210_fpioa_probe() Geert Uytterhoeven
2024-09-05  0:40 ` Damien Le Moal
2024-09-23  9:06 ` Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).