From: Frans Pop Date: Thu, 29 Jan 2009 22:25:25 +0000 (-0800) Subject: hp-wmi: set initial docking state X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=3095eb87bb36ae880608fe3fc46cfd59ced1f319;p=linux-beck.git hp-wmi: set initial docking state If the initial state is not set when the input device is set up, the first docking event after the module is loaded will be lost. Signed-off-by: Frans Pop Acked-by: Matthew Garrett Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/platform/x86/hp-wmi.c b/drivers/platform/x86/hp-wmi.c index 626042066be4..de91ddab0a86 100644 --- a/drivers/platform/x86/hp-wmi.c +++ b/drivers/platform/x86/hp-wmi.c @@ -382,6 +382,11 @@ static int __init hp_wmi_input_setup(void) case KE_SW: set_bit(EV_SW, hp_wmi_input_dev->evbit); set_bit(key->keycode, hp_wmi_input_dev->swbit); + + /* Set initial dock state */ + input_report_switch(hp_wmi_input_dev, key->keycode, + hp_wmi_dock_state()); + input_sync(hp_wmi_input_dev); break; } }