#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>
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);
{""}
};
+#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)
#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*/