aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenrique de Moraes Holschuh <hmh@hmh.eng.br>2007-04-21 10:08:34 -0400
committerLen Brown <len.brown@intel.com>2007-04-21 23:30:34 -0400
commit0dcef77c5b889338811d35e786b42046259fe433 (patch)
tree05c66f57eb7b3b73a81d3503a71f7b01a96d4f51
parenta5763f2223ce3fdbc75923f8c948fc7b59ed2f96 (diff)
ACPI: thinkpad-acpi: improve thinkpad detection
Improve the detection of ThinkPads, so as to reduce the chances of false positives. Since this could potentially add false negatives on the very old models, add a module parameter to force the detection of a thinkpad. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
-rw-r--r--Documentation/thinkpad-acpi.txt7
-rw-r--r--drivers/misc/thinkpad_acpi.c13
-rw-r--r--drivers/misc/thinkpad_acpi.h1
3 files changed, 21 insertions, 0 deletions
diff --git a/Documentation/thinkpad-acpi.txt b/Documentation/thinkpad-acpi.txt
index 20d5ec309cbd..1a42b77e2ece 100644
--- a/Documentation/thinkpad-acpi.txt
+++ b/Documentation/thinkpad-acpi.txt
@@ -716,3 +716,10 @@ to enable more than one output class, just add their values.
716 716
717There is also a kernel build option to enable more debugging 717There is also a kernel build option to enable more debugging
718information, which may be necessary to debug driver problems. 718information, which may be necessary to debug driver problems.
719
720Force loading of module
721-----------------------
722
723If thinkpad-acpi refuses to detect your ThinkPad, you can try to specify
724the module parameter force_load=1. Regardless of whether this works or
725not, please contact ibm-acpi-devel@lists.sourceforge.net with a report.
diff --git a/drivers/misc/thinkpad_acpi.c b/drivers/misc/thinkpad_acpi.c
index 56112684967b..cddf81bb2d97 100644
--- a/drivers/misc/thinkpad_acpi.c
+++ b/drivers/misc/thinkpad_acpi.c
@@ -2881,6 +2881,16 @@ static int __init probe_for_thinkpad(void)
2881 return -ENODEV; 2881 return -ENODEV;
2882 } 2882 }
2883 2883
2884 /*
2885 * Risks a regression on very old machines, but reduces potential
2886 * false positives a damn great deal
2887 */
2888 if (!is_thinkpad)
2889 is_thinkpad = dmi_name_in_vendors("IBM");
2890
2891 if (!is_thinkpad && !force_load)
2892 return -ENODEV;
2893
2884 return 0; 2894 return 0;
2885} 2895}
2886 2896
@@ -2986,6 +2996,9 @@ module_param(experimental, int, 0);
2986static u32 dbg_level; 2996static u32 dbg_level;
2987module_param_named(debug, dbg_level, uint, 0); 2997module_param_named(debug, dbg_level, uint, 0);
2988 2998
2999static int force_load;
3000module_param(force_load, int, 0);
3001
2989#define IBM_PARAM(feature) \ 3002#define IBM_PARAM(feature) \
2990 module_param_call(feature, set_ibm_param, NULL, NULL, 0) 3003 module_param_call(feature, set_ibm_param, NULL, NULL, 0)
2991 3004
diff --git a/drivers/misc/thinkpad_acpi.h b/drivers/misc/thinkpad_acpi.h
index 97467b71b727..20203981cb7a 100644
--- a/drivers/misc/thinkpad_acpi.h
+++ b/drivers/misc/thinkpad_acpi.h
@@ -128,6 +128,7 @@ static char *next_cmd(char **cmds);
128/* Module */ 128/* Module */
129static int experimental; 129static int experimental;
130static u32 dbg_level; 130static u32 dbg_level;
131static int force_load;
131static char *ibm_thinkpad_ec_found; 132static char *ibm_thinkpad_ec_found;
132 133
133static char* check_dmi_for_ec(void); 134static char* check_dmi_for_ec(void);