aboutsummaryrefslogtreecommitdiffstats
path: root/arch/i386/kernel/apm.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/i386/kernel/apm.c')
-rw-r--r--arch/i386/kernel/apm.c20
1 files changed, 6 insertions, 14 deletions
diff --git a/arch/i386/kernel/apm.c b/arch/i386/kernel/apm.c
index 0ff65abcd56c..d7811c4e8b50 100644
--- a/arch/i386/kernel/apm.c
+++ b/arch/i386/kernel/apm.c
@@ -228,10 +228,10 @@
228#include <asm/system.h> 228#include <asm/system.h>
229#include <asm/uaccess.h> 229#include <asm/uaccess.h>
230#include <asm/desc.h> 230#include <asm/desc.h>
231#include <asm/i8253.h>
231 232
232#include "io_ports.h" 233#include "io_ports.h"
233 234
234extern spinlock_t i8253_lock;
235extern unsigned long get_cmos_time(void); 235extern unsigned long get_cmos_time(void);
236extern void machine_real_restart(unsigned char *, int); 236extern void machine_real_restart(unsigned char *, int);
237 237
@@ -346,10 +346,10 @@ extern int (*console_blank_hook)(int);
346struct apm_user { 346struct apm_user {
347 int magic; 347 int magic;
348 struct apm_user * next; 348 struct apm_user * next;
349 int suser: 1; 349 unsigned int suser: 1;
350 int writer: 1; 350 unsigned int writer: 1;
351 int reader: 1; 351 unsigned int reader: 1;
352 int suspend_wait: 1; 352 unsigned int suspend_wait: 1;
353 int suspend_result; 353 int suspend_result;
354 int suspends_pending; 354 int suspends_pending;
355 int standbys_pending; 355 int standbys_pending;
@@ -911,14 +911,7 @@ static void apm_power_off(void)
911 0xcd, 0x15 /* int $0x15 */ 911 0xcd, 0x15 /* int $0x15 */
912 }; 912 };
913 913
914 /*
915 * This may be called on an SMP machine.
916 */
917#ifdef CONFIG_SMP
918 /* Some bioses don't like being called from CPU != 0 */ 914 /* Some bioses don't like being called from CPU != 0 */
919 set_cpus_allowed(current, cpumask_of_cpu(0));
920 BUG_ON(smp_processor_id() != 0);
921#endif
922 if (apm_info.realmode_power_off) 915 if (apm_info.realmode_power_off)
923 { 916 {
924 (void)apm_save_cpus(); 917 (void)apm_save_cpus();
@@ -1168,8 +1161,7 @@ static void get_time_diff(void)
1168static void reinit_timer(void) 1161static void reinit_timer(void)
1169{ 1162{
1170#ifdef INIT_TIMER_AFTER_SUSPEND 1163#ifdef INIT_TIMER_AFTER_SUSPEND
1171 unsigned long flags; 1164 unsigned long flags;
1172 extern spinlock_t i8253_lock;
1173 1165
1174 spin_lock_irqsave(&i8253_lock, flags); 1166 spin_lock_irqsave(&i8253_lock, flags);
1175 /* set the clock to 100 Hz */ 1167 /* set the clock to 100 Hz */