Merge branch 'thermal' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux...
authorZhang Rui <rui.zhang@intel.com>
Mon, 15 Apr 2013 01:26:58 +0000 (09:26 +0800)
committerZhang Rui <rui.zhang@intel.com>
Mon, 15 Apr 2013 01:26:58 +0000 (09:26 +0800)
Conflicts:
drivers/thermal/cpu_cooling.c

1  2 
drivers/thermal/cpu_cooling.c
include/linux/thermal.h

@@@ -235,31 -301,19 +301,19 @@@ static int cpufreq_get_max_state(struc
                                 unsigned long *state)
  {
        struct cpufreq_cooling_device *cpufreq_device = cdev->devdata;
 -      struct cpumask *maskPtr = &cpufreq_device->allowed_cpus;
 +      struct cpumask *mask = &cpufreq_device->allowed_cpus;
        unsigned int cpu;
-       struct cpufreq_frequency_table *table;
        unsigned long count = 0;
-       int i = 0;
+       int ret;
  
 -      cpu = cpumask_any(maskPtr);
 +      cpu = cpumask_any(mask);
-       table = cpufreq_frequency_get_table(cpu);
-       if (!table) {
-               *state = 0;
-               return 0;
-       }
  
-       for (i = 0; (table[i].frequency != CPUFREQ_TABLE_END); i++) {
-               if (table[i].frequency == CPUFREQ_ENTRY_INVALID)
-                       continue;
-               count++;
-       }
+       ret = get_property(cpu, 0, (unsigned int *)&count, GET_MAXL);
  
-       if (count > 0) {
-               *state = --count;
-               return 0;
-       }
+       if (count > 0)
+               *state = count;
  
-       return -EINVAL;
+       return ret;
  }
  
  /**
Simple merge