Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=0dcef77c5b889338811d35e786b42046259fe433
Commit:     0dcef77c5b889338811d35e786b42046259fe433
Parent:     a5763f2223ce3fdbc75923f8c948fc7b59ed2f96
Author:     Henrique de Moraes Holschuh <[EMAIL PROTECTED]>
AuthorDate: Sat Apr 21 11:08:34 2007 -0300
Committer:  Len Brown <[EMAIL PROTECTED]>
CommitDate: Sat Apr 21 23:30:34 2007 -0400

    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 <[EMAIL PROTECTED]>
    Signed-off-by: Len Brown <[EMAIL PROTECTED]>
---
 Documentation/thinkpad-acpi.txt |    7 +++++++
 drivers/misc/thinkpad_acpi.c    |   13 +++++++++++++
 drivers/misc/thinkpad_acpi.h    |    1 +
 3 files changed, 21 insertions(+), 0 deletions(-)

diff --git a/Documentation/thinkpad-acpi.txt b/Documentation/thinkpad-acpi.txt
index 20d5ec3..1a42b77 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.
 
 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 [EMAIL PROTECTED] with a report.
diff --git a/drivers/misc/thinkpad_acpi.c b/drivers/misc/thinkpad_acpi.c
index 5611268..cddf81b 100644
--- a/drivers/misc/thinkpad_acpi.c
+++ b/drivers/misc/thinkpad_acpi.c
@@ -2881,6 +2881,16 @@ static int __init probe_for_thinkpad(void)
                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;
 }
 
@@ -2986,6 +2996,9 @@ module_param(experimental, int, 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)
 
diff --git a/drivers/misc/thinkpad_acpi.h b/drivers/misc/thinkpad_acpi.h
index 97467b7..2020398 100644
--- a/drivers/misc/thinkpad_acpi.h
+++ b/drivers/misc/thinkpad_acpi.h
@@ -128,6 +128,7 @@ static char *next_cmd(char **cmds);
 /* Module */
 static int experimental;
 static u32 dbg_level;
+static int force_load;
 static char *ibm_thinkpad_ec_found;
 
 static char* check_dmi_for_ec(void);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to