hp-wmi: set initial docking state
Subsystems (2)
PATCH 1/1 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 <[email protected]>
Cc Matthew Garrett <[email protected]>
---
Patch is based on what is done for the LID switch in drivers/acpi/button.c and has been tested on my HP 2510p.
As this is a (minor) bug fix, it would be nice to have it in 2.6.29.
Cheers,
FJP
drivers/platform/x86/hp-wmi.c +5 -0
@@ -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 ; } }
Quoted 5 lines · Frans Pop
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 <[email protected]>Cc Matthew Garrett <[email protected]>
Acked-by Matthew Garrett <[email protected]>
Signature · 1 line
Matthew Garrett | [email protected]