Add patches accepted for 2.6.26-rc1
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / releases / upstream / 2.6.26-rc1 / 0007-ACPI-thinkpad-acpi-claim-tpacpi-as-an-official-sho.patch
blobc160de382413ca7d9ea08b5e7d8cff6642dbb889
1 From 95e57ab2cbd8b016327b23d76da8a96cbd26ac0c Mon Sep 17 00:00:00 2001
2 From: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
3 Date: Sat, 26 Apr 2008 01:02:22 -0300
4 Subject: ACPI: thinkpad-acpi: claim tpacpi as an official short handle (v1.1)
6 Unfortunately, a lot of stuff in the kernel has size limitations, so
7 "thinkpad-acpi" ends up eating up too much real estate. We were using
8 "tpacpi" in symbols already, but this shorthand was not visible to
9 userland.
11 Document that the driver will use tpacpi as a short hand where necessary,
12 and use it to name the kernel thread for NVRAM polling (now named
13 "ktpacpi_nvramd").
15 Also, register a module alias with the shorthand. One can refer to the
16 module using the shorthand name.
18 Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
19 Signed-off-by: Len Brown <len.brown@intel.com>
20 ---
21 Documentation/laptops/thinkpad-acpi.txt | 5 +++++
22 drivers/misc/thinkpad_acpi.c | 8 ++++++--
23 2 files changed, 11 insertions(+), 2 deletions(-)
25 diff --git a/Documentation/laptops/thinkpad-acpi.txt b/Documentation/laptops/thinkpad-acpi.txt
26 index a77da28..a41bc89 100644
27 --- a/Documentation/laptops/thinkpad-acpi.txt
28 +++ b/Documentation/laptops/thinkpad-acpi.txt
29 @@ -18,6 +18,11 @@ This driver used to be named ibm-acpi until kernel 2.6.21 and release
30 moved to the drivers/misc tree and renamed to thinkpad-acpi for kernel
31 2.6.22, and release 0.14.
33 +The driver is named "thinkpad-acpi". In some places, like module
34 +names, "thinkpad_acpi" is used because of userspace issues.
36 +"tpacpi" is used as a shorthand where "thinkpad-acpi" would be too
37 +long due to length limitations on some Linux kernel versions.
39 Status
40 ------
41 diff --git a/drivers/misc/thinkpad_acpi.c b/drivers/misc/thinkpad_acpi.c
42 index 5e25abc..2b73dfa 100644
43 --- a/drivers/misc/thinkpad_acpi.c
44 +++ b/drivers/misc/thinkpad_acpi.c
45 @@ -133,8 +133,11 @@ enum {
46 #define TPACPI_PROC_DIR "ibm"
47 #define TPACPI_ACPI_EVENT_PREFIX "ibm"
48 #define TPACPI_DRVR_NAME TPACPI_FILE
49 +#define TPACPI_DRVR_SHORTNAME "tpacpi"
50 #define TPACPI_HWMON_DRVR_NAME TPACPI_NAME "_hwmon"
52 +#define TPACPI_NVRAM_KTHREAD_NAME "ktpacpi_nvramd"
54 #define TPACPI_MAX_ACPI_ARGS 3
56 /* Debugging */
57 @@ -1523,8 +1526,7 @@ static void hotkey_poll_setup(int may_warn)
58 (tpacpi_inputdev->users > 0 || hotkey_report_mode < 2)) {
59 if (!tpacpi_hotkey_task) {
60 tpacpi_hotkey_task = kthread_run(hotkey_kthread,
61 - NULL,
62 - TPACPI_FILE "d");
63 + NULL, TPACPI_NVRAM_KTHREAD_NAME);
64 if (IS_ERR(tpacpi_hotkey_task)) {
65 tpacpi_hotkey_task = NULL;
66 printk(TPACPI_ERR
67 @@ -6316,6 +6318,8 @@ static int __init thinkpad_acpi_module_init(void)
68 /* Please remove this in year 2009 */
69 MODULE_ALIAS("ibm_acpi");
71 +MODULE_ALIAS(TPACPI_DRVR_SHORTNAME);
74 * DMI matching for module autoloading
76 --
77 1.5.4.4