Linux clock framework development
 help / color / mirror / Atom feed
* [PATCH] clk: lan966x: use devm_platform_ioremap_resource()
@ 2026-05-06 23:35 Rosen Penev
  2026-05-07 22:47 ` Brian Masney
  0 siblings, 1 reply; 2+ messages in thread
From: Rosen Penev @ 2026-05-06 23:35 UTC (permalink / raw)
  To: linux-clk; +Cc: Michael Turquette, Stephen Boyd, Brian Masney, open list

Use it as another instance is used above. This one is optional so treat
it as such.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
 drivers/clk/clk-lan966x.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/drivers/clk/clk-lan966x.c b/drivers/clk/clk-lan966x.c
index 3c7a48c616bb..8c7b273eb756 100644
--- a/drivers/clk/clk-lan966x.c
+++ b/drivers/clk/clk-lan966x.c
@@ -253,7 +253,6 @@ static int lan966x_clk_probe(struct platform_device *pdev)
 	struct clk_hw_onecell_data *hw_data;
 	struct device *dev = &pdev->dev;
 	void __iomem *gate_base;
-	struct resource *res;
 	int i, ret;
 
 	data = device_get_match_data(dev);
@@ -283,12 +282,8 @@ static int lan966x_clk_probe(struct platform_device *pdev)
 		}
 	}
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
-	if (res) {
-		gate_base = devm_ioremap_resource(&pdev->dev, res);
-		if (IS_ERR(gate_base))
-			return PTR_ERR(gate_base);
-
+	gate_base = devm_platform_ioremap_resource(pdev, 1);
+	if (!IS_ERR(gate_base)) {
 		hw_data->num = data->num_total_clks;
 
 		ret = lan966x_gate_clk_register(dev, data, hw_data, gate_base);
-- 
2.54.0


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

end of thread, other threads:[~2026-05-07 22:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-06 23:35 [PATCH] clk: lan966x: use devm_platform_ioremap_resource() Rosen Penev
2026-05-07 22:47 ` Brian Masney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox