]> err.no Git - linux-2.6/commitdiff
ACPI: thinkpad-acpi: claim tpacpi as an official short handle (v1.1)
authorHenrique de Moraes Holschuh <hmh@hmh.eng.br>
Sat, 26 Apr 2008 04:02:22 +0000 (01:02 -0300)
committerLen Brown <len.brown@intel.com>
Tue, 29 Apr 2008 13:47:01 +0000 (09:47 -0400)
Unfortunately, a lot of stuff in the kernel has size limitations, so
"thinkpad-acpi" ends up eating up too much real estate.  We were using
"tpacpi" in symbols already, but this shorthand was not visible to
userland.

Document that the driver will use tpacpi as a short hand where necessary,
and use it to name the kernel thread for NVRAM polling (now named
"ktpacpi_nvramd").

Also, register a module alias with the shorthand.  One can refer to the
module using the shorthand name.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
Documentation/laptops/thinkpad-acpi.txt
drivers/misc/thinkpad_acpi.c

index a77da28a6f8e9b1bd930fa12fa398821d602ad61..a41bc893f8d6755866a82c71bc310ec708f9d656 100644 (file)
@@ -18,6 +18,11 @@ This driver used to be named ibm-acpi until kernel 2.6.21 and release
 moved to the drivers/misc tree and renamed to thinkpad-acpi for kernel
 2.6.22, and release 0.14.
 
+The driver is named "thinkpad-acpi".  In some places, like module
+names, "thinkpad_acpi" is used because of userspace issues.
+
+"tpacpi" is used as a shorthand where "thinkpad-acpi" would be too
+long due to length limitations on some Linux kernel versions.
 
 Status
 ------
index 5e25abc540081ded604c68e4ab3d40e9862cd00a..2b73dfafac9dea49b4745aae0e4f67727d07b0a9 100644 (file)
@@ -133,8 +133,11 @@ enum {
 #define TPACPI_PROC_DIR "ibm"
 #define TPACPI_ACPI_EVENT_PREFIX "ibm"
 #define TPACPI_DRVR_NAME TPACPI_FILE
+#define TPACPI_DRVR_SHORTNAME "tpacpi"
 #define TPACPI_HWMON_DRVR_NAME TPACPI_NAME "_hwmon"
 
+#define TPACPI_NVRAM_KTHREAD_NAME "ktpacpi_nvramd"
+
 #define TPACPI_MAX_ACPI_ARGS 3
 
 /* Debugging */
@@ -1523,8 +1526,7 @@ static void hotkey_poll_setup(int may_warn)
            (tpacpi_inputdev->users > 0 || hotkey_report_mode < 2)) {
                if (!tpacpi_hotkey_task) {
                        tpacpi_hotkey_task = kthread_run(hotkey_kthread,
-                                                        NULL,
-                                                        TPACPI_FILE "d");
+                                       NULL, TPACPI_NVRAM_KTHREAD_NAME);
                        if (IS_ERR(tpacpi_hotkey_task)) {
                                tpacpi_hotkey_task = NULL;
                                printk(TPACPI_ERR
@@ -6316,6 +6318,8 @@ static int __init thinkpad_acpi_module_init(void)
 /* Please remove this in year 2009 */
 MODULE_ALIAS("ibm_acpi");
 
+MODULE_ALIAS(TPACPI_DRVR_SHORTNAME);
+
 /*
  * DMI matching for module autoloading
  *