Commit 3095eb87 authored by Frans Pop's avatar Frans Pop Committed by Linus Torvalds

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: default avatarFrans Pop <elendil@planet.nl>
Acked-by: default avatarMatthew Garrett <mjg59@srcf.ucam.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent fb9f88e1
...@@ -382,6 +382,11 @@ static int __init hp_wmi_input_setup(void) ...@@ -382,6 +382,11 @@ static int __init hp_wmi_input_setup(void)
case KE_SW: case KE_SW:
set_bit(EV_SW, hp_wmi_input_dev->evbit); set_bit(EV_SW, hp_wmi_input_dev->evbit);
set_bit(key->keycode, hp_wmi_input_dev->swbit); 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; break;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment