浏览代码

ACPI: thinkpad-acpi: minor hotkey_radio_sw fixes

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>
Henrique de Moraes Holschuh 17 年之前
父节点
当前提交
d147da73c9
共有 2 个文件被更改,包括 5 次插入5 次删除
  1. 1 1
      Documentation/laptops/thinkpad-acpi.txt
  2. 4 4
      drivers/misc/thinkpad_acpi.c

+ 1 - 1
Documentation/laptops/thinkpad-acpi.txt

@@ -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.

+ 4 - 4
drivers/misc/thinkpad_acpi.c

@@ -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)