Pull thermal into release branch
[linux-drm-fsl-dcu.git] / arch / i386 / kernel / cpuid.c
index 51130b39cd2e8de87f8b2269f150b4d6692018cb..5c2faa10e9fac42f604d0af086af0618835c289d 100644 (file)
@@ -48,7 +48,6 @@ static struct class *cpuid_class;
 #ifdef CONFIG_SMP
 
 struct cpuid_command {
-       int cpu;
        u32 reg;
        u32 *data;
 };
@@ -57,8 +56,7 @@ static void cpuid_smp_cpuid(void *cmd_block)
 {
        struct cpuid_command *cmd = (struct cpuid_command *)cmd_block;
 
-       if (cmd->cpu == smp_processor_id())
-               cpuid(cmd->reg, &cmd->data[0], &cmd->data[1], &cmd->data[2],
+       cpuid(cmd->reg, &cmd->data[0], &cmd->data[1], &cmd->data[2],
                      &cmd->data[3]);
 }
 
@@ -70,11 +68,10 @@ static inline void do_cpuid(int cpu, u32 reg, u32 * data)
        if (cpu == smp_processor_id()) {
                cpuid(reg, &data[0], &data[1], &data[2], &data[3]);
        } else {
-               cmd.cpu = cpu;
                cmd.reg = reg;
                cmd.data = data;
 
-               smp_call_function(cpuid_smp_cpuid, &cmd, 1, 1);
+               smp_call_function_single(cpu, cpuid_smp_cpuid, &cmd, 1, 1);
        }
        preempt_enable();
 }
@@ -148,7 +145,7 @@ static int cpuid_open(struct inode *inode, struct file *file)
 /*
  * File operations we support
  */
-static struct file_operations cpuid_fops = {
+static const struct file_operations cpuid_fops = {
        .owner = THIS_MODULE,
        .llseek = cpuid_seek,
        .read = cpuid_read,
@@ -172,9 +169,11 @@ static int cpuid_class_cpu_callback(struct notifier_block *nfb, unsigned long ac
 
        switch (action) {
        case CPU_ONLINE:
+       case CPU_ONLINE_FROZEN:
                cpuid_device_create(cpu);
                break;
        case CPU_DEAD:
+       case CPU_DEAD_FROZEN:
                device_destroy(cpuid_class, MKDEV(CPUID_MAJOR, cpu));
                break;
        }