Store rejected patch "ACPI: thinkpad-acpi: switch Lenovo BIOS to ACPI backlight mode"
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / rejected / ibm-acpi_work-alongside-generic-hotkey.patch
blob94ab3ef1fa6c31b78c6ef8edf7c5899cfa3dfe51
1 commit a43d12b20a1d7816b7c84fd63d2a0ca8abb7f77a
2 Author: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
3 Date: Sun Jan 7 18:00:15 2007 -0200
5 ACPI: ibm-acpi: work alongside the generic hotkey driver
7 There is no reason why ibm-acpi should fail to load at all if generic
8 hotkey support is enabled. Instead, we should just stop generating hotkey
9 events ourselves... but everything else (hotkey masks, etc) can remain
10 operational.
12 Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
14 diff --git a/drivers/acpi/ibm_acpi.c b/drivers/acpi/ibm_acpi.c
15 index 23e963a..a2c73e8 100644
16 --- a/drivers/acpi/ibm_acpi.c
17 +++ b/drivers/acpi/ibm_acpi.c
18 @@ -560,6 +560,9 @@ static int hotkey_init(void)
20 if (!hotkey_get(&hotkey_orig_status, &hotkey_orig_mask))
21 return -ENODEV;
23 + if (!acpi_specific_hotkey_enabled)
24 + printk(IBM_NOTICE "hotkey event generation disabled\n");
27 return 0;
28 @@ -636,11 +639,13 @@ static void hotkey_notify(struct ibm_struct *ibm, u32 event)
30 int hkey;
32 - if (acpi_evalf(hkey_handle, &hkey, "MHKP", "d"))
33 - acpi_bus_generate_event(ibm->device, event, hkey);
34 - else {
35 - printk(IBM_ERR "unknown hotkey event %d\n", event);
36 - acpi_bus_generate_event(ibm->device, event, 0);
37 + if (acpi_specific_hotkey_enabled) {
38 + if (acpi_evalf(hkey_handle, &hkey, "MHKP", "d"))
39 + acpi_bus_generate_event(ibm->device, event, hkey);
40 + else {
41 + printk(IBM_ERR "unknown hotkey event %d\n", event);
42 + acpi_bus_generate_event(ibm->device, event, 0);
43 + }
47 @@ -2713,11 +2718,6 @@ static int __init acpi_ibm_init(void)
48 if (acpi_disabled)
49 return -ENODEV;
51 - if (!acpi_specific_hotkey_enabled) {
52 - printk(IBM_ERR "using generic hotkey driver\n");
53 - return -ENODEV;
54 - }
56 /* ec is required because many other handles are relative to it */
57 IBM_HANDLE_INIT(ec);
58 if (!ec_handle) {