diff options
Diffstat (limited to 'drivers/acpi/blacklist.c')
-rw-r--r-- | drivers/acpi/blacklist.c | 27 |
1 files changed, 6 insertions, 21 deletions
diff --git a/drivers/acpi/blacklist.c b/drivers/acpi/blacklist.c index 9824f679a910..f9c972b26f4f 100644 --- a/drivers/acpi/blacklist.c +++ b/drivers/acpi/blacklist.c | |||
@@ -77,28 +77,13 @@ static struct acpi_blacklist_item acpi_blacklist[] __initdata = { | |||
77 | 77 | ||
78 | static int __init blacklist_by_year(void) | 78 | static int __init blacklist_by_year(void) |
79 | { | 79 | { |
80 | int year; | 80 | int year = dmi_get_year(DMI_BIOS_DATE); |
81 | char *s = dmi_get_system_info(DMI_BIOS_DATE); | 81 | /* Doesn't exist? Likely an old system */ |
82 | 82 | if (year == -1) | |
83 | if (!s) | 83 | return 1; |
84 | return 0; | 84 | /* 0? Likely a buggy new BIOS */ |
85 | if (!*s) | 85 | if (year == 0) |
86 | return 0; | ||
87 | |||
88 | s = strrchr(s, '/'); | ||
89 | if (!s) | ||
90 | return 0; | 86 | return 0; |
91 | |||
92 | s += 1; | ||
93 | |||
94 | year = simple_strtoul(s, NULL, 0); | ||
95 | |||
96 | if (year < 100) { /* 2-digit year */ | ||
97 | year += 1900; | ||
98 | if (year < 1996) /* no dates < spec 1.0 */ | ||
99 | year += 100; | ||
100 | } | ||
101 | |||
102 | if (year < CONFIG_ACPI_BLACKLIST_YEAR) { | 87 | if (year < CONFIG_ACPI_BLACKLIST_YEAR) { |
103 | printk(KERN_ERR PREFIX "BIOS age (%d) fails cutoff (%d), " | 88 | printk(KERN_ERR PREFIX "BIOS age (%d) fails cutoff (%d), " |
104 | "acpi=force is required to enable ACPI\n", | 89 | "acpi=force is required to enable ACPI\n", |