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>
There is also a kernel build option to enable more debugging
information, which may be necessary to debug driver problems.
There is also a kernel build option to enable more debugging
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.
+ /*
+ * 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;
+
static u32 dbg_level;
module_param_named(debug, dbg_level, uint, 0);
static u32 dbg_level;
module_param_named(debug, dbg_level, uint, 0);
+static int force_load;
+module_param(force_load, int, 0);
+
#define IBM_PARAM(feature) \
module_param_call(feature, set_ibm_param, NULL, NULL, 0)
#define IBM_PARAM(feature) \
module_param_call(feature, set_ibm_param, NULL, NULL, 0)
/* Module */
static int experimental;
static u32 dbg_level;
/* Module */
static int experimental;
static u32 dbg_level;
static char *ibm_thinkpad_ec_found;
static char* check_dmi_for_ec(void);
static char *ibm_thinkpad_ec_found;
static char* check_dmi_for_ec(void);