ARM: rockchip: rk3188-cpufreq only avaliable on rk3188
author黄涛 <huangtao@rock-chips.com>
Thu, 20 Feb 2014 06:28:36 +0000 (14:28 +0800)
committer黄涛 <huangtao@rock-chips.com>
Thu, 20 Feb 2014 08:12:15 +0000 (16:12 +0800)
arch/arm/mach-rockchip/rk3188-cpufreq.c

index a32c543feaf084eb123fc07ee8a925a33eee0b89..08b8efe5c1ac3399ff360212074b36121ae1a238 100644 (file)
@@ -707,17 +707,12 @@ static struct cpufreq_driver rk3188_cpufreq_driver = {
 };
 
 static int __init rk3188_cpufreq_driver_init(void)
-{      
+{
+       if (!cpu_is_rk3188())
+               return 0;
        register_pm_notifier(&rk3188_cpufreq_pm_notifier);
        register_reboot_notifier(&rk3188_cpufreq_reboot_notifier);
        return cpufreq_register_driver(&rk3188_cpufreq_driver);
 }
 
-static void __exit rk3188_cpufreq_driver_exit(void)
-{
-       cpufreq_unregister_driver(&rk3188_cpufreq_driver);
-}
-
 device_initcall(rk3188_cpufreq_driver_init);
-module_exit(rk3188_cpufreq_driver_exit);
-