38 lines
1.1 KiB
Diff
38 lines
1.1 KiB
Diff
|
From e42461217a717781a254ac5dd4bbac4571fe73e8 Mon Sep 17 00:00:00 2001
|
||
|
From: Ondrej Jirman <megi@xff.cz>
|
||
|
Date: Thu, 29 Jun 2023 16:27:18 +0200
|
||
|
Subject: [PATCH 451/464] cpufreq: rockchip: Only enable this driver on RK3588
|
||
|
|
||
|
Signed-off-by: Ondrej Jirman <megi@xff.cz>
|
||
|
---
|
||
|
drivers/cpufreq/rockchip-cpufreq.c | 6 ++++++
|
||
|
1 file changed, 6 insertions(+)
|
||
|
|
||
|
diff --git a/drivers/cpufreq/rockchip-cpufreq.c b/drivers/cpufreq/rockchip-cpufreq.c
|
||
|
index 6a60ec05d652..88f4b079f4d4 100644
|
||
|
--- a/drivers/cpufreq/rockchip-cpufreq.c
|
||
|
+++ b/drivers/cpufreq/rockchip-cpufreq.c
|
||
|
@@ -608,6 +608,9 @@ static int __init rockchip_cpufreq_driver_init(void)
|
||
|
{
|
||
|
int ret;
|
||
|
|
||
|
+ if (of_machine_is_compatible("rockchip,rk3588") <= 0)
|
||
|
+ return -ENODEV;
|
||
|
+
|
||
|
ret = platform_driver_register(&rockchip_cpufreq_platdrv);
|
||
|
if (ret)
|
||
|
return ret;
|
||
|
@@ -630,6 +633,9 @@ module_init(rockchip_cpufreq_driver_init);
|
||
|
|
||
|
static void __exit rockchip_cpufreq_driver_exit(void)
|
||
|
{
|
||
|
+ if (of_machine_is_compatible("rockchip,rk3588") <= 0)
|
||
|
+ return;
|
||
|
+
|
||
|
platform_device_unregister(cpufreq_pdev);
|
||
|
platform_driver_unregister(&rockchip_cpufreq_platdrv);
|
||
|
}
|
||
|
--
|
||
|
2.34.1
|
||
|
|