updated on Wed Jan 25 00:20:47 UTC 2012
[aur-mirror.git] / linux-fedora / disable-i8042-check-on-apple-mac.patch
blobf99d0f900ce2d7930e4d366a092e7da7b6f1ebc4
1 From 2a79554c864ac58fa2ad982f0fcee2cc2aa33eb5 Mon Sep 17 00:00:00 2001
2 From: Bastien Nocera <hadess@hadess.net>
3 Date: Thu, 20 May 2010 10:30:31 -0400
4 Subject: Disable i8042 checks on Intel Apple Macs
6 As those computers never had any i8042 controllers, and the
7 current lookup code could potentially lock up/hang/wait for
8 timeout for long periods of time.
10 Fixes intermittent hangs on boot on a MacbookAir1,1
12 Signed-off-by: Bastien Nocera <hadess@hadess.net>
13 ---
14 drivers/input/serio/i8042.c | 22 ++++++++++++++++++++++
15 1 files changed, 22 insertions(+), 0 deletions(-)
17 diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c
18 index 6440a8f..4d7cf98 100644
19 --- a/drivers/input/serio/i8042.c
20 +++ b/drivers/input/serio/i8042.c
21 @@ -1451,6 +1451,22 @@ static struct platform_driver i8042_driver = {
22 .shutdown = i8042_shutdown,
25 +#ifdef CONFIG_DMI
26 +static struct dmi_system_id __initdata dmi_system_table[] = {
27 + {
28 + .matches = {
29 + DMI_MATCH(DMI_BIOS_VENDOR, "Apple Computer, Inc.")
30 + },
31 + },
32 + {
33 + .matches = {
34 + DMI_MATCH(DMI_BIOS_VENDOR, "Apple Inc.")
35 + },
36 + },
37 + {}
38 +};
39 +#endif /*CONFIG_DMI*/
41 static int __init i8042_init(void)
43 struct platform_device *pdev;
44 @@ -1458,6 +1474,12 @@ static int __init i8042_init(void)
46 dbg_init();
48 +#ifdef CONFIG_DMI
49 + /* Intel Apple Macs never have an i8042 controller */
50 + if (dmi_check_system(dmi_system_table) > 0)
51 + return -ENODEV;
52 +#endif /*CONFIG_DMI*/
54 err = i8042_platform_init();
55 if (err)
56 return err;
57 --
58 1.7.0.1