]> git.hungrycats.org Git - linux/commitdiff
[ACPI] move acpi_bios_year() to blacklist.c from dmi_scan.c (Pavel Machek)
authorLen Brown <len.brown@intel.com>
Wed, 1 Sep 2004 19:04:13 +0000 (15:04 -0400)
committerLen Brown <lenb@dhcppc3.>
Wed, 1 Sep 2004 19:04:13 +0000 (15:04 -0400)
arch/i386/kernel/dmi_scan.c
drivers/acpi/blacklist.c
include/linux/acpi.h

index 669470b42c597c030bbe9b677d41ae92874a8856..ecbe363c2279bb1e237bca989af70ebdb5bc15e2 100644 (file)
@@ -4,7 +4,7 @@
 #include <linux/init.h>
 #include <linux/module.h>
 #include <linux/slab.h>
-#include <asm/acpi.h>
+#include <linux/acpi.h>
 #include <asm/io.h>
 #include <linux/pm.h>
 #include <asm/system.h>
@@ -454,24 +454,10 @@ static __initdata struct dmi_blacklist dmi_blacklist[]={
 static __init void dmi_check_blacklist(void)
 {
 #ifdef CONFIG_ACPI_BOOT
-#define        ACPI_BLACKLIST_CUTOFF_YEAR      2001
-
        if (dmi_ident[DMI_BIOS_DATE]) { 
                char *s = strrchr(dmi_ident[DMI_BIOS_DATE], '/'); 
-               if (s) { 
-                       int year, disable = 0;
-                       s++; 
-                       year = simple_strtoul(s,NULL,0); 
-                       if (year >= 1000) 
-                               disable = year < ACPI_BLACKLIST_CUTOFF_YEAR; 
-                       else if (year < 1 || (year > 90 && year <= 99))
-                               disable = 1; 
-                       if (disable && !acpi_force) { 
-                               printk(KERN_NOTICE "ACPI disabled because your bios is from %s and too old\n", s);
-                               printk(KERN_NOTICE "You can enable it with acpi=force\n");
-                               disable_acpi();
-                       } 
-               }
+               if (s && !acpi_force)
+                       acpi_bios_year(s+1);
        }
 #endif
        dmi_check_system(dmi_blacklist);
index d93fc733e5951bf5667b8a23ff256dd159150956..3405b492f8b54f06cfa903d5188118aba7036752 100644 (file)
@@ -69,6 +69,27 @@ static struct acpi_blacklist_item acpi_blacklist[] __initdata =
        {""}
 };
 
+#define        ACPI_BLACKLIST_CUTOFF_YEAR      2001
+
+/*
+ * Notice: this is called from dmi_scan.c, which contains second (!) blacklist
+ */
+void __init
+acpi_bios_year(char *s)
+{
+       int year, disable = 0;
+
+       year = simple_strtoul(s,NULL,0); 
+       if (year >= 1000) 
+               disable = year < ACPI_BLACKLIST_CUTOFF_YEAR; 
+       else if (year < 1 || (year > 90 && year <= 99))
+               disable = 1; 
+       if (disable) { 
+               printk(KERN_NOTICE "ACPI disabled because your bios is from %s and too old\n", s);
+               printk(KERN_NOTICE "You can enable it with acpi=force\n");
+               acpi_disabled = 1; 
+       }
+}
 
 int __init
 acpi_blacklisted(void)
index f82aa67ea6b825abdf80d1263ab2beb76569fce8..041f660ec0093674f12469e353055f9318fa633a 100644 (file)
@@ -453,14 +453,15 @@ void acpi_pci_unregister_driver(struct acpi_pci_driver *driver);
 
 #ifdef CONFIG_ACPI_EC
 
-int ec_read(u8 addr, u8 *val);
-int ec_write(u8 addr, u8 val);
+extern int ec_read(u8 addr, u8 *val);
+extern int ec_write(u8 addr, u8 val);
 
 #endif /*CONFIG_ACPI_EC*/
 
 #ifdef CONFIG_ACPI_INTERPRETER
 
-int acpi_blacklisted(void);
+extern int acpi_blacklisted(void);
+extern void acpi_bios_year(char *s);
 
 #else /*!CONFIG_ACPI_INTERPRETER*/