瀏覽代碼

Input: wistron - disable wifi/bluetooth on suspend

Try to save battery power by disabling wifi and bluetooth on suspend.

Signed-off-by: Miloslav Trmac <mitr@volny.cz>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Miloslav Trmac 19 年之前
父節點
當前提交
e753b650e1
共有 1 個文件被更改,包括 6 次插入0 次删除
  1. 6 0
      drivers/input/misc/wistron_btns.c

+ 6 - 0
drivers/input/misc/wistron_btns.c

@@ -451,6 +451,12 @@ static int wistron_suspend(struct platform_device *dev, pm_message_t state)
 {
 	del_timer_sync(&poll_timer);
 
+	if (have_wifi)
+		bios_set_state(WIFI, 0);
+
+	if (have_bluetooth)
+		bios_set_state(BLUETOOTH, 0);
+
 	return 0;
 }