]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/x86/kernel/cpuid.c
PM: Remove destroy_suspended_device()
[linux-2.6-omap-h63xx.git] / arch / x86 / kernel / cpuid.c
index c10ebc4b8e4ba36b9d0d7ee72fefaf8bd07e21f9..daff52a6224857f79985d20c96b0661922c88504 100644 (file)
@@ -62,9 +62,9 @@ static void cpuid_smp_cpuid(void *cmd_block)
 static loff_t cpuid_seek(struct file *file, loff_t offset, int orig)
 {
        loff_t ret;
+       struct inode *inode = file->f_mapping->host;
 
-       lock_kernel();
-
+       mutex_lock(&inode->i_mutex);
        switch (orig) {
        case 0:
                file->f_pos = offset;
@@ -77,8 +77,7 @@ static loff_t cpuid_seek(struct file *file, loff_t offset, int orig)
        default:
                ret = -EINVAL;
        }
-
-       unlock_kernel();
+       mutex_unlock(&inode->i_mutex);
        return ret;
 }
 
@@ -155,12 +154,10 @@ static int __cpuinit cpuid_class_cpu_callback(struct notifier_block *nfb,
                err = cpuid_device_create(cpu);
                break;
        case CPU_UP_CANCELED:
+       case CPU_UP_CANCELED_FROZEN:
        case CPU_DEAD:
                cpuid_device_destroy(cpu);
                break;
-       case CPU_UP_CANCELED_FROZEN:
-               destroy_suspended_device(cpuid_class, MKDEV(CPUID_MAJOR, cpu));
-               break;
        }
        return err ? NOTIFY_BAD : NOTIFY_OK;
 }