aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorAnson Huang <b20788@freescale.com>2011-10-09 10:38:56 +0800
committerEric Miao <eric.miao@canonical.com>2011-11-10 07:38:45 +0800
commitc7979729346605382d4804797482c12c9f13d0a3 (patch)
tree119bfc5b2e6385d93a3610ca4d26e0c48b801494 /drivers
parentf7a66f6206853b41a5d0a20c260f134d05a768f7 (diff)
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 <b20788@freescale.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mxc/thermal/cooling.c29
1 files changed, 2 insertions, 27 deletions
diff --git a/drivers/mxc/thermal/cooling.c b/drivers/mxc/thermal/cooling.c
index 714bbfc5d03..a0812ea5865 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);