Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 37943407 authored by Billy Tsai's avatar Billy Tsai Committed by Greg Kroah-Hartman
Browse files

gpio: aspeed: Use devm_clk api to manage clock source



[ Upstream commit a6191a3d18119184237f4ee600039081ad992320 ]

Replace of_clk_get with devm_clk_get_enabled to manage the clock source.

Fixes: 5ae4cb94 ("gpio: aspeed: Add debounce support")
Reviewed-by: default avatarAndrew Jeffery <andrew@codeconstruct.com.au>
Signed-off-by: default avatarBilly Tsai <billy_tsai@aspeedtech.com>
Link: https://lore.kernel.org/r/20241008081450.1490955-3-billy_tsai@aspeedtech.com


Signed-off-by: default avatarBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 6f4642e0
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1176,7 +1176,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");