Commit 0dcef77c authored by Henrique de Moraes Holschuh's avatar Henrique de Moraes Holschuh Committed by Len Brown

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: default avatarHenrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent a5763f22
...@@ -716,3 +716,10 @@ to enable more than one output class, just add their values. ...@@ -716,3 +716,10 @@ to enable more than one output class, just add their values.
There is also a kernel build option to enable more debugging There is also a kernel build option to enable more debugging
information, which may be necessary to debug driver problems. information, which may be necessary to debug driver problems.
Force loading of module
-----------------------
If thinkpad-acpi refuses to detect your ThinkPad, you can try to specify
the module parameter force_load=1. Regardless of whether this works or
not, please contact ibm-acpi-devel@lists.sourceforge.net with a report.
...@@ -2881,6 +2881,16 @@ static int __init probe_for_thinkpad(void) ...@@ -2881,6 +2881,16 @@ static int __init probe_for_thinkpad(void)
return -ENODEV; return -ENODEV;
} }
/*
* Risks a regression on very old machines, but reduces potential
* false positives a damn great deal
*/
if (!is_thinkpad)
is_thinkpad = dmi_name_in_vendors("IBM");
if (!is_thinkpad && !force_load)
return -ENODEV;
return 0; return 0;
} }
...@@ -2986,6 +2996,9 @@ module_param(experimental, int, 0); ...@@ -2986,6 +2996,9 @@ module_param(experimental, int, 0);
static u32 dbg_level; static u32 dbg_level;
module_param_named(debug, dbg_level, uint, 0); module_param_named(debug, dbg_level, uint, 0);
static int force_load;
module_param(force_load, int, 0);
#define IBM_PARAM(feature) \ #define IBM_PARAM(feature) \
module_param_call(feature, set_ibm_param, NULL, NULL, 0) module_param_call(feature, set_ibm_param, NULL, NULL, 0)
......
...@@ -128,6 +128,7 @@ static char *next_cmd(char **cmds); ...@@ -128,6 +128,7 @@ static char *next_cmd(char **cmds);
/* Module */ /* Module */
static int experimental; static int experimental;
static u32 dbg_level; static u32 dbg_level;
static int force_load;
static char *ibm_thinkpad_ec_found; static char *ibm_thinkpad_ec_found;
static char* check_dmi_for_ec(void); static char* check_dmi_for_ec(void);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment