Commit 792979c8 authored by Henrique de Moraes Holschuh's avatar Henrique de Moraes Holschuh Committed by Len Brown

thinkpad-acpi: use input_set_capability

Use input_set_capability() instead of set_bit.
Signed-off-by: default avatarHenrique de Moraes Holschuh <hmh@hmh.eng.br>
Cc: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent 9ebd9e83
...@@ -3348,16 +3348,14 @@ static int __init hotkey_init(struct ibm_init_struct *iibm) ...@@ -3348,16 +3348,14 @@ static int __init hotkey_init(struct ibm_init_struct *iibm)
TPACPI_HOTKEY_MAP_SIZE); TPACPI_HOTKEY_MAP_SIZE);
} }
set_bit(EV_KEY, tpacpi_inputdev->evbit); input_set_capability(tpacpi_inputdev, EV_MSC, MSC_SCAN);
set_bit(EV_MSC, tpacpi_inputdev->evbit);
set_bit(MSC_SCAN, tpacpi_inputdev->mscbit);
tpacpi_inputdev->keycodesize = TPACPI_HOTKEY_MAP_TYPESIZE; tpacpi_inputdev->keycodesize = TPACPI_HOTKEY_MAP_TYPESIZE;
tpacpi_inputdev->keycodemax = TPACPI_HOTKEY_MAP_LEN; tpacpi_inputdev->keycodemax = TPACPI_HOTKEY_MAP_LEN;
tpacpi_inputdev->keycode = hotkey_keycode_map; tpacpi_inputdev->keycode = hotkey_keycode_map;
for (i = 0; i < TPACPI_HOTKEY_MAP_LEN; i++) { for (i = 0; i < TPACPI_HOTKEY_MAP_LEN; i++) {
if (hotkey_keycode_map[i] != KEY_RESERVED) { if (hotkey_keycode_map[i] != KEY_RESERVED) {
set_bit(hotkey_keycode_map[i], input_set_capability(tpacpi_inputdev, EV_KEY,
tpacpi_inputdev->keybit); hotkey_keycode_map[i]);
} else { } else {
if (i < sizeof(hotkey_reserved_mask)*8) if (i < sizeof(hotkey_reserved_mask)*8)
hotkey_reserved_mask |= 1 << i; hotkey_reserved_mask |= 1 << i;
...@@ -3365,12 +3363,10 @@ static int __init hotkey_init(struct ibm_init_struct *iibm) ...@@ -3365,12 +3363,10 @@ static int __init hotkey_init(struct ibm_init_struct *iibm)
} }
if (tp_features.hotkey_wlsw) { if (tp_features.hotkey_wlsw) {
set_bit(EV_SW, tpacpi_inputdev->evbit); input_set_capability(tpacpi_inputdev, EV_SW, SW_RFKILL_ALL);
set_bit(SW_RFKILL_ALL, tpacpi_inputdev->swbit);
} }
if (tp_features.hotkey_tablet) { if (tp_features.hotkey_tablet) {
set_bit(EV_SW, tpacpi_inputdev->evbit); input_set_capability(tpacpi_inputdev, EV_SW, SW_TABLET_MODE);
set_bit(SW_TABLET_MODE, tpacpi_inputdev->swbit);
} }
/* Do not issue duplicate brightness change events to /* Do not issue duplicate brightness change events to
......
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