summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBilly Tsai <billy_tsai@aspeedtech.com>2024-10-08 10:14:45 +0200
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>2024-10-08 16:01:58 +0200
commita6191a3d18119184237f4ee600039081ad992320 (patch)
tree8dbf36df6c6f5b2cfdc06cdfc62e223d3112717c
parentgpio: aspeed: Add the flush write to ensure the write complete. (diff)
downloadlinux-a6191a3d18119184237f4ee600039081ad992320.tar.xz
linux-a6191a3d18119184237f4ee600039081ad992320.zip
gpio: aspeed: Use devm_clk api to manage clock source
Replace of_clk_get with devm_clk_get_enabled to manage the clock source. Fixes: 5ae4cb94b313 ("gpio: aspeed: Add debounce support") Reviewed-by: Andrew Jeffery <andrew@codeconstruct.com.au> Signed-off-by: Billy Tsai <billy_tsai@aspeedtech.com> Link: https://lore.kernel.org/r/20241008081450.1490955-3-billy_tsai@aspeedtech.com Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
-rw-r--r--drivers/gpio/gpio-aspeed.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpio/gpio-aspeed.c b/drivers/gpio/gpio-aspeed.c
index 98551b7f6de2..ea40ad43a79b 100644
--- a/drivers/gpio/gpio-aspeed.c
+++ b/drivers/gpio/gpio-aspeed.c
@@ -1193,7 +1193,7 @@ static int __init 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");