summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Lezcano <daniel.lezcano@linaro.org>2022-01-30 22:02:09 +0100
committerDaniel Lezcano <daniel.lezcano@linaro.org>2022-02-23 19:46:29 +0100
commitf1ebef9e55f3c49063b575e97d2019832b8f8ef9 (patch)
tree0ded8b3cf81b73632afecdf1e94516069ea78c55
parentbfded2ca8f36935ff13b3b30f8e66d6135e178ac (diff)
downloadlinux-stable-f1ebef9e55f3c49063b575e97d2019832b8f8ef9.tar.gz
linux-stable-f1ebef9e55f3c49063b575e97d2019832b8f8ef9.tar.bz2
linux-stable-f1ebef9e55f3c49063b575e97d2019832b8f8ef9.zip
dtpm/soc/rk3399: Add the ability to unload the module
The dtpm hierarchy can now be removed with the dtpm_destroy_hierarchy() function. Add the module_exit() callback so the module can be unloaded by removing the previously created hierarchy. Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org> Link: https://lore.kernel.org/r/20220130210210.549877-7-daniel.lezcano@linaro.org
-rw-r--r--drivers/soc/rockchip/dtpm.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/soc/rockchip/dtpm.c b/drivers/soc/rockchip/dtpm.c
index ebebb748488b..5a23784b5221 100644
--- a/drivers/soc/rockchip/dtpm.c
+++ b/drivers/soc/rockchip/dtpm.c
@@ -52,6 +52,12 @@ static int __init rockchip_dtpm_init(void)
}
module_init(rockchip_dtpm_init);
+static void __exit rockchip_dtpm_exit(void)
+{
+ return dtpm_destroy_hierarchy();
+}
+module_exit(rockchip_dtpm_exit);
+
MODULE_SOFTDEP("pre: panfrost cpufreq-dt");
MODULE_DESCRIPTION("Rockchip DTPM driver");
MODULE_LICENSE("GPL");