lkml.org 
[lkml]   [2022]   [Sep]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 13/20] gpio/rockchip: disable and put clocks when remove
Date
Match to the probe, do disable and put the clocks when module to remove.

Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
---
drivers/gpio/gpio-rockchip.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/drivers/gpio/gpio-rockchip.c b/drivers/gpio/gpio-rockchip.c
index 511e93a6a429..1a800f972594 100644
--- a/drivers/gpio/gpio-rockchip.c
+++ b/drivers/gpio/gpio-rockchip.c
@@ -757,7 +757,10 @@ static int rockchip_gpio_remove(struct platform_device *pdev)
{
struct rockchip_pin_bank *bank = platform_get_drvdata(pdev);

+ clk_put(bank->clk);
+ clk_put(bank->db_clk);
clk_disable_unprepare(bank->clk);
+ clk_disable_unprepare(bank->db_clk);
gpiochip_remove(&bank->gpio_chip);

return 0;
--
2.25.1
\
 
 \ /
  Last update: 2022-09-20 12:33    [W:0.352 / U:0.336 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site