aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Panin <pazke@donpac.ru>2005-06-25 17:54:45 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-25 19:24:28 -0400
commit0f8133a8db81ff824a4abbe5bb0f15bf034d31c3 (patch)
treef3cfec2713a84e5bf040e947dbe299232991f9ea
parentaea00143a8db8c0b31dca85bff3c325444d93f0f (diff)
[PATCH] dmi: move ACPI sleep quirk
This patch moves ACPI sleep quirk out of dmi_scan.c Signed-off-by: Andrey Panin <pazke@donpac.ru> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--arch/i386/kernel/acpi/boot.c1
-rw-r--r--arch/i386/kernel/acpi/sleep.c27
-rw-r--r--arch/i386/kernel/dmi_scan.c16
3 files changed, 28 insertions, 16 deletions
diff --git a/arch/i386/kernel/acpi/boot.c b/arch/i386/kernel/acpi/boot.c
index 0771596c549..9f63ae0f404 100644
--- a/arch/i386/kernel/acpi/boot.c
+++ b/arch/i386/kernel/acpi/boot.c
@@ -1024,6 +1024,7 @@ static struct dmi_system_id __initdata acpi_dmi_table[] = {
1024 }, 1024 },
1025 }, 1025 },
1026#endif 1026#endif
1027 { }
1027}; 1028};
1028 1029
1029#endif /* __i386__ */ 1030#endif /* __i386__ */
diff --git a/arch/i386/kernel/acpi/sleep.c b/arch/i386/kernel/acpi/sleep.c
index 28bb0514bb6..c1af93032ff 100644
--- a/arch/i386/kernel/acpi/sleep.c
+++ b/arch/i386/kernel/acpi/sleep.c
@@ -7,6 +7,7 @@
7 7
8#include <linux/acpi.h> 8#include <linux/acpi.h>
9#include <linux/bootmem.h> 9#include <linux/bootmem.h>
10#include <linux/dmi.h>
10#include <asm/smp.h> 11#include <asm/smp.h>
11#include <asm/tlbflush.h> 12#include <asm/tlbflush.h>
12 13
@@ -91,3 +92,29 @@ static int __init acpi_sleep_setup(char *str)
91 92
92 93
93__setup("acpi_sleep=", acpi_sleep_setup); 94__setup("acpi_sleep=", acpi_sleep_setup);
95
96
97static __init int reset_videomode_after_s3(struct dmi_system_id *d)
98{
99 acpi_video_flags |= 2;
100 return 0;
101}
102
103static __initdata struct dmi_system_id acpisleep_dmi_table[] = {
104 { /* Reset video mode after returning from ACPI S3 sleep */
105 .callback = reset_videomode_after_s3,
106 .ident = "Toshiba Satellite 4030cdt",
107 .matches = {
108 DMI_MATCH(DMI_PRODUCT_NAME, "S4030CDT/4.3"),
109 },
110 },
111 { }
112};
113
114static int __init acpisleep_dmi_init(void)
115{
116 dmi_check_system(acpisleep_dmi_table);
117 return 0;
118}
119
120core_initcall(acpisleep_dmi_init);
diff --git a/arch/i386/kernel/dmi_scan.c b/arch/i386/kernel/dmi_scan.c
index b4bae60f506..065c30a73c1 100644
--- a/arch/i386/kernel/dmi_scan.c
+++ b/arch/i386/kernel/dmi_scan.c
@@ -177,16 +177,6 @@ static __init int broken_toshiba_keyboard(struct dmi_blacklist *d)
177} 177}
178 178
179 179
180#ifdef CONFIG_ACPI_SLEEP
181static __init int reset_videomode_after_s3(struct dmi_blacklist *d)
182{
183 /* See acpi_wakeup.S */
184 extern long acpi_video_flags;
185 acpi_video_flags |= 2;
186 return 0;
187}
188#endif
189
190 180
191/* 181/*
192 * Process the DMI blacklists 182 * Process the DMI blacklists
@@ -204,12 +194,6 @@ static __initdata struct dmi_blacklist dmi_blacklist[]={
204 MATCH(DMI_PRODUCT_NAME, "S4030CDT/4.3"), 194 MATCH(DMI_PRODUCT_NAME, "S4030CDT/4.3"),
205 NO_MATCH, NO_MATCH, NO_MATCH 195 NO_MATCH, NO_MATCH, NO_MATCH
206 } }, 196 } },
207#ifdef CONFIG_ACPI_SLEEP
208 { reset_videomode_after_s3, "Toshiba Satellite 4030cdt", { /* Reset video mode after returning from ACPI S3 sleep */
209 MATCH(DMI_PRODUCT_NAME, "S4030CDT/4.3"),
210 NO_MATCH, NO_MATCH, NO_MATCH
211 } },
212#endif
213 197
214 { NULL, } 198 { NULL, }
215}; 199};