]> err.no Git - linux-2.6/commitdiff
ACPI: thinkpad-acpi: minor hotkey_radio_sw fixes
authorHenrique de Moraes Holschuh <hmh@hmh.eng.br>
Sat, 16 Feb 2008 04:17:57 +0000 (02:17 -0200)
committerLen Brown <len.brown@intel.com>
Sat, 16 Feb 2008 05:34:04 +0000 (00:34 -0500)
Fixes some minor points in the radio switch code and docs.

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 91f688c3018511f6f1547a6b93a34bd51c1d443a..606af162838220c812dc6c47539ea7d6b6895efb 100644 (file)
@@ -306,7 +306,7 @@ sysfs notes:
                The recommended polling frequency is 10Hz.
 
        hotkey_radio_sw:
-               if the ThinkPad has a hardware radio switch, this
+               If the ThinkPad has a hardware radio switch, this
                attribute will read 0 if the switch is in the "radios
                disabled" position, and 1 if the switch is in the
                "radios enabled" position.
index 35483502a11788f44f3155604e0967f6e1878d3c..c119cf23e1ff2a54550ca86a66df387c4a660a72 100644 (file)
@@ -1161,15 +1161,15 @@ static void tpacpi_input_send_radiosw(void)
 {
        int wlsw;
 
-       mutex_lock(&tpacpi_inputdev_send_mutex);
-
        if (tp_features.hotkey_wlsw && !hotkey_get_wlsw(&wlsw)) {
+               mutex_lock(&tpacpi_inputdev_send_mutex);
+
                input_report_switch(tpacpi_inputdev,
                                    SW_RADIO, !!wlsw);
                input_sync(tpacpi_inputdev);
-       }
 
-       mutex_unlock(&tpacpi_inputdev_send_mutex);
+               mutex_unlock(&tpacpi_inputdev_send_mutex);
+       }
 }
 
 static void tpacpi_input_send_tabletsw(unsigned int state)