aboutsummaryrefslogtreecommitdiffstats
path: root/arch/i386/kernel/acpi/sleep.c
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2005-08-05 00:44:28 -0400
committerLen Brown <len.brown@intel.com>2005-08-05 00:45:14 -0400
commit4be44fcd3bf648b782f4460fd06dfae6c42ded4b (patch)
tree5b5b7d296ea58786f53b95e5eac9565ff66890b0 /arch/i386/kernel/acpi/sleep.c
parentc65ade4dc8b486e8c8b9b0a6399789a5428e2039 (diff)
[ACPI] Lindent all ACPI files
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'arch/i386/kernel/acpi/sleep.c')
-rw-r--r--arch/i386/kernel/acpi/sleep.c35
1 files changed, 18 insertions, 17 deletions
diff --git a/arch/i386/kernel/acpi/sleep.c b/arch/i386/kernel/acpi/sleep.c
index c1af93032ff3..1cb2b186a3af 100644
--- a/arch/i386/kernel/acpi/sleep.c
+++ b/arch/i386/kernel/acpi/sleep.c
@@ -20,12 +20,13 @@ extern void zap_low_mappings(void);
20 20
21extern unsigned long FASTCALL(acpi_copy_wakeup_routine(unsigned long)); 21extern unsigned long FASTCALL(acpi_copy_wakeup_routine(unsigned long));
22 22
23static void init_low_mapping(pgd_t *pgd, int pgd_limit) 23static void init_low_mapping(pgd_t * pgd, int pgd_limit)
24{ 24{
25 int pgd_ofs = 0; 25 int pgd_ofs = 0;
26 26
27 while ((pgd_ofs < pgd_limit) && (pgd_ofs + USER_PTRS_PER_PGD < PTRS_PER_PGD)) { 27 while ((pgd_ofs < pgd_limit)
28 set_pgd(pgd, *(pgd+USER_PTRS_PER_PGD)); 28 && (pgd_ofs + USER_PTRS_PER_PGD < PTRS_PER_PGD)) {
29 set_pgd(pgd, *(pgd + USER_PTRS_PER_PGD));
29 pgd_ofs++, pgd++; 30 pgd_ofs++, pgd++;
30 } 31 }
31 flush_tlb_all(); 32 flush_tlb_all();
@@ -37,12 +38,13 @@ static void init_low_mapping(pgd_t *pgd, int pgd_limit)
37 * Create an identity mapped page table and copy the wakeup routine to 38 * Create an identity mapped page table and copy the wakeup routine to
38 * low memory. 39 * low memory.
39 */ 40 */
40int acpi_save_state_mem (void) 41int acpi_save_state_mem(void)
41{ 42{
42 if (!acpi_wakeup_address) 43 if (!acpi_wakeup_address)
43 return 1; 44 return 1;
44 init_low_mapping(swapper_pg_dir, USER_PTRS_PER_PGD); 45 init_low_mapping(swapper_pg_dir, USER_PTRS_PER_PGD);
45 memcpy((void *) acpi_wakeup_address, &wakeup_start, &wakeup_end - &wakeup_start); 46 memcpy((void *)acpi_wakeup_address, &wakeup_start,
47 &wakeup_end - &wakeup_start);
46 acpi_copy_wakeup_routine(acpi_wakeup_address); 48 acpi_copy_wakeup_routine(acpi_wakeup_address);
47 49
48 return 0; 50 return 0;
@@ -51,7 +53,7 @@ int acpi_save_state_mem (void)
51/* 53/*
52 * acpi_restore_state - undo effects of acpi_save_state_mem 54 * acpi_restore_state - undo effects of acpi_save_state_mem
53 */ 55 */
54void acpi_restore_state_mem (void) 56void acpi_restore_state_mem(void)
55{ 57{
56 zap_low_mappings(); 58 zap_low_mappings();
57} 59}
@@ -67,7 +69,8 @@ void acpi_restore_state_mem (void)
67void __init acpi_reserve_bootmem(void) 69void __init acpi_reserve_bootmem(void)
68{ 70{
69 if ((&wakeup_end - &wakeup_start) > PAGE_SIZE) { 71 if ((&wakeup_end - &wakeup_start) > PAGE_SIZE) {
70 printk(KERN_ERR "ACPI: Wakeup code way too big, S3 disabled.\n"); 72 printk(KERN_ERR
73 "ACPI: Wakeup code way too big, S3 disabled.\n");
71 return; 74 return;
72 } 75 }
73 76
@@ -90,10 +93,8 @@ static int __init acpi_sleep_setup(char *str)
90 return 1; 93 return 1;
91} 94}
92 95
93
94__setup("acpi_sleep=", acpi_sleep_setup); 96__setup("acpi_sleep=", acpi_sleep_setup);
95 97
96
97static __init int reset_videomode_after_s3(struct dmi_system_id *d) 98static __init int reset_videomode_after_s3(struct dmi_system_id *d)
98{ 99{
99 acpi_video_flags |= 2; 100 acpi_video_flags |= 2;
@@ -101,14 +102,14 @@ static __init int reset_videomode_after_s3(struct dmi_system_id *d)
101} 102}
102 103
103static __initdata struct dmi_system_id acpisleep_dmi_table[] = { 104static __initdata struct dmi_system_id acpisleep_dmi_table[] = {
104 { /* Reset video mode after returning from ACPI S3 sleep */ 105 { /* Reset video mode after returning from ACPI S3 sleep */
105 .callback = reset_videomode_after_s3, 106 .callback = reset_videomode_after_s3,
106 .ident = "Toshiba Satellite 4030cdt", 107 .ident = "Toshiba Satellite 4030cdt",
107 .matches = { 108 .matches = {
108 DMI_MATCH(DMI_PRODUCT_NAME, "S4030CDT/4.3"), 109 DMI_MATCH(DMI_PRODUCT_NAME, "S4030CDT/4.3"),
109 }, 110 },
110 }, 111 },
111 { } 112 {}
112}; 113};
113 114
114static int __init acpisleep_dmi_init(void) 115static int __init acpisleep_dmi_init(void)