Skip to content

Commit

Permalink
hp-wmi: set initial docking state
Browse files Browse the repository at this point in the history
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]>
Acked-by: Matthew Garrett <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Frans Pop authored and torvalds committed Jan 30, 2009
1 parent fb9f88e commit 3095eb8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/platform/x86/hp-wmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 3095eb8

Please sign in to comment.