From: Rafael J. Wysocki <[email protected]>

Since __cpufreq_remove_dev_prepare() and __cpufreq_remove_dev_finish()
are about CPU offline rather than about CPU removal, rename them to
cpufreq_offline_prepare() and cpufreq_offline_finish(), respectively.

Also change their argument from a struct device pointer to a CPU
number, because they use the CPU number only internally anyway.

Signed-off-by: Rafael J. Wysocki <[email protected]>
---
 drivers/cpufreq/cpufreq.c |   14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

Index: linux-pm/drivers/cpufreq/cpufreq.c
===================================================================
--- linux-pm.orig/drivers/cpufreq/cpufreq.c
+++ linux-pm/drivers/cpufreq/cpufreq.c
@@ -1376,9 +1376,8 @@ out_release_rwsem:
        return ret;
 }
 
-static void __cpufreq_remove_dev_prepare(struct device *dev)
+static void cpufreq_offline_prepare(unsigned int cpu)
 {
-       unsigned int cpu = dev->id;
        struct cpufreq_policy *policy;
 
        pr_debug("%s: unregistering CPU %u\n", __func__, cpu);
@@ -1423,9 +1422,8 @@ static void __cpufreq_remove_dev_prepare
        }
 }
 
-static void __cpufreq_remove_dev_finish(struct device *dev)
+static void cpufreq_offline_finish(unsigned int cpu)
 {
-       unsigned int cpu = dev->id;
        struct cpufreq_policy *policy = per_cpu(cpufreq_cpu_data, cpu);
 
        if (!policy) {
@@ -1467,8 +1465,8 @@ static int cpufreq_remove_dev(struct dev
                return 0;
 
        if (cpu_online(cpu)) {
-               __cpufreq_remove_dev_prepare(dev);
-               __cpufreq_remove_dev_finish(dev);
+               cpufreq_offline_prepare(cpu);
+               cpufreq_offline_finish(cpu);
        }
 
        /* sysfs links are removed only on subsys callback */
@@ -2360,11 +2358,11 @@ static int cpufreq_cpu_callback(struct n
                        break;
 
                case CPU_DOWN_PREPARE:
-                       __cpufreq_remove_dev_prepare(dev);
+                       cpufreq_offline_prepare(cpu);
                        break;
 
                case CPU_POST_DEAD:
-                       __cpufreq_remove_dev_finish(dev);
+                       cpufreq_offline_finish(cpu);
                        break;
 
                case CPU_DOWN_FAILED:

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to