aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2008-03-23 15:28:24 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2008-04-19 22:10:28 -0400
commitb844eba292b477cda14582bfc6f535deed57a82d (patch)
treeb2418a9a4fc672654f4592ae0a3e2853d82271c3 /arch/x86/kernel
parent138fe4e069798d9aa948a5402ff15e58f483ee4e (diff)
PM: Remove destroy_suspended_device()
After 2.6.24 there was a plan to make the PM core acquire all device semaphores during a suspend/hibernation to protect itself from concurrent operations involving device objects. That proved to be too heavy-handed and we found a better way to achieve the goal, but before it happened, we had introduced the functions device_pm_schedule_removal() and destroy_suspended_device() to allow drivers to "safely" destroy a suspended device and we had adapted some drivers to use them. Now that these functions are no longer necessary, it seems reasonable to remove them and modify their users to use the normal device unregistration instead. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'arch/x86/kernel')
-rw-r--r--arch/x86/kernel/cpuid.c4
-rw-r--r--arch/x86/kernel/msr.c4
2 files changed, 2 insertions, 6 deletions
diff --git a/arch/x86/kernel/cpuid.c b/arch/x86/kernel/cpuid.c
index 288e7a6598ac..daff52a62248 100644
--- a/arch/x86/kernel/cpuid.c
+++ b/arch/x86/kernel/cpuid.c
@@ -154,12 +154,10 @@ static int __cpuinit cpuid_class_cpu_callback(struct notifier_block *nfb,
154 err = cpuid_device_create(cpu); 154 err = cpuid_device_create(cpu);
155 break; 155 break;
156 case CPU_UP_CANCELED: 156 case CPU_UP_CANCELED:
157 case CPU_UP_CANCELED_FROZEN:
157 case CPU_DEAD: 158 case CPU_DEAD:
158 cpuid_device_destroy(cpu); 159 cpuid_device_destroy(cpu);
159 break; 160 break;
160 case CPU_UP_CANCELED_FROZEN:
161 destroy_suspended_device(cpuid_class, MKDEV(CPUID_MAJOR, cpu));
162 break;
163 } 161 }
164 return err ? NOTIFY_BAD : NOTIFY_OK; 162 return err ? NOTIFY_BAD : NOTIFY_OK;
165} 163}
diff --git a/arch/x86/kernel/msr.c b/arch/x86/kernel/msr.c
index 4dfb40530057..1f3abe048e93 100644
--- a/arch/x86/kernel/msr.c
+++ b/arch/x86/kernel/msr.c
@@ -162,12 +162,10 @@ static int __cpuinit msr_class_cpu_callback(struct notifier_block *nfb,
162 err = msr_device_create(cpu); 162 err = msr_device_create(cpu);
163 break; 163 break;
164 case CPU_UP_CANCELED: 164 case CPU_UP_CANCELED:
165 case CPU_UP_CANCELED_FROZEN:
165 case CPU_DEAD: 166 case CPU_DEAD:
166 msr_device_destroy(cpu); 167 msr_device_destroy(cpu);
167 break; 168 break;
168 case CPU_UP_CANCELED_FROZEN:
169 destroy_suspended_device(msr_class, MKDEV(MSR_MAJOR, cpu));
170 break;
171 } 169 }
172 return err ? NOTIFY_BAD : NOTIFY_OK; 170 return err ? NOTIFY_BAD : NOTIFY_OK;
173} 171}