diff mbox series

[v6,7/7] gpio: aspeed: Use devm_clk api to manage clock source

Message ID 20240927111744.3511373-8-billy_tsai@aspeedtech.com (mailing list archive)
State New, archived
Headers show
Series Add Aspeed G7 gpio support | expand

Commit Message

Billy Tsai Sept. 27, 2024, 11:17 a.m. UTC
Replace of_clk_get with devm_clk_get_enabled to manage the clock source.

Fixes: 5ae4cb94b313 ("gpio: aspeed: Add debounce support")
Signed-off-by: Billy Tsai <billy_tsai@aspeedtech.com>
---
 drivers/gpio/gpio-aspeed.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Andrew Jeffery Sept. 30, 2024, 4:42 a.m. UTC | #1
On Fri, 2024-09-27 at 19:17 +0800, Billy Tsai wrote:
> Replace of_clk_get with devm_clk_get_enabled to manage the clock source.
> 
> Fixes: 5ae4cb94b313 ("gpio: aspeed: Add debounce support")
> Signed-off-by: Billy Tsai <billy_tsai@aspeedtech.com>

Reviewed-by: Andrew Jeffery <andrew@codeconstruct.com.au>

Though as noted in patch 3/7, 7/7 (this patch) and 5/7 should probably
be ordered before 3/7.
diff mbox series

Patch

diff --git a/drivers/gpio/gpio-aspeed.c b/drivers/gpio/gpio-aspeed.c
index 7cea3c5ba696..5443129e0820 100644
--- a/drivers/gpio/gpio-aspeed.c
+++ b/drivers/gpio/gpio-aspeed.c
@@ -1339,7 +1339,7 @@  static int aspeed_gpio_probe(struct platform_device *pdev)
 	if (!gpio_id)
 		return -EINVAL;
 
-	gpio->clk = of_clk_get(pdev->dev.of_node, 0);
+	gpio->clk = devm_clk_get_enabled(&pdev->dev, NULL);
 	if (IS_ERR(gpio->clk)) {
 		dev_warn(&pdev->dev,
 				"Failed to get clock from devicetree, debouncing disabled\n");