From 04fe46564555eda4d815719cf3ac03694cef5879 Mon Sep 17 00:00:00 2001 From: Anson Huang Date: Sun, 9 Oct 2011 10:38:56 +0800 Subject: [PATCH] ENGR00159512 [Mx6]Fix thermal driver build warning 1. Print should use %d instead of %ld when printing a unsigned int; 2. Remove unused function. Signed-off-by: Anson Huang --- drivers/mxc/thermal/cooling.c | 29 ++--------------------------- 1 file changed, 2 insertions(+), 27 deletions(-) diff --git a/drivers/mxc/thermal/cooling.c b/drivers/mxc/thermal/cooling.c index 714bbfc5d039..a0812ea58652 100644 --- a/drivers/mxc/thermal/cooling.c +++ b/drivers/mxc/thermal/cooling.c @@ -53,8 +53,6 @@ static unsigned int cpufreq; static unsigned int cpufreq_new; static char cpufreq_new_str[10]; static int cpufreq_change_count; -static DEFINE_PER_CPU(unsigned int, cpufreq_thermal_reduction_pctg); - int anatop_thermal_cpufreq_get_cur(void) { @@ -95,7 +93,7 @@ int anatop_thermal_cpufreq_up(void) strcpy(cpu_sys_file, CPUx); sprintf(cpu_number, "%d%s", 0, "/cpufreq/scaling_setspeed"); - sprintf(cpufreq_new_str, "%ld", cpufreq_new); + sprintf(cpufreq_new_str, "%d", cpufreq_new); strcat(cpu_sys_file, cpu_number); fd = sys_open((const char __user __force *)cpu_sys_file, @@ -125,7 +123,7 @@ int anatop_thermal_cpufreq_down(void) strcpy(cpu_sys_file, CPUx); sprintf(cpu_number, "%d%s", 0, "/cpufreq/scaling_setspeed"); - sprintf(cpufreq_new_str, "%ld", cpufreq_new); + sprintf(cpufreq_new_str, "%d", cpufreq_new); strcat(cpu_sys_file, cpu_number); fd = sys_open((const char __user __force *)cpu_sys_file, @@ -238,29 +236,6 @@ imx_processor_set_cur_state(struct thermal_cooling_device *cdev, return result; } -static int anatop_thermal_cpufreq_notifier(struct notifier_block *nb, - unsigned long event, void *data) -{ - struct cpufreq_policy *policy = data; - unsigned long max_freq = 0; - - if (event != CPUFREQ_ADJUST) - goto out; - - max_freq = ( - policy->cpuinfo.max_freq * - (100 - per_cpu(cpufreq_thermal_reduction_pctg, policy->cpu) * 20) - ) / 100; - - cpufreq_verify_within_limits(policy, 0, max_freq); - -out: - return 0; -} -static struct notifier_block anatop_thermal_cpufreq_notifier_block = { - .notifier_call = anatop_thermal_cpufreq_notifier, -}; - void anatop_thermal_cpufreq_init(void) { cpu_op_tbl = get_cpu_op(&cpu_op_nr); -- 2.39.2