aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform
diff options
context:
space:
mode:
authorHenrique de Moraes Holschuh <hmh@hmh.eng.br>2009-12-08 20:36:29 -0500
committerLen Brown <len.brown@intel.com>2009-12-09 15:45:31 -0500
commit792979c8032b8f5adb77ea986db7082fff04c8e7 (patch)
tree58076eedf4842fa5c047a19cd8d835e8c2ed3543 /drivers/platform
parent9ebd9e833648745fa5ac6998b9e0153ccd3ba839 (diff)
thinkpad-acpi: use input_set_capability
Use input_set_capability() instead of set_bit. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Cc: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/platform')
-rw-r--r--drivers/platform/x86/thinkpad_acpi.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
index b3e256b2cf1..53d6c331806 100644
--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
@@ -3348,16 +3348,14 @@ static int __init hotkey_init(struct ibm_init_struct *iibm)
3348 TPACPI_HOTKEY_MAP_SIZE); 3348 TPACPI_HOTKEY_MAP_SIZE);
3349 } 3349 }
3350 3350
3351 set_bit(EV_KEY, tpacpi_inputdev->evbit); 3351 input_set_capability(tpacpi_inputdev, EV_MSC, MSC_SCAN);
3352 set_bit(EV_MSC, tpacpi_inputdev->evbit);
3353 set_bit(MSC_SCAN, tpacpi_inputdev->mscbit);
3354 tpacpi_inputdev->keycodesize = TPACPI_HOTKEY_MAP_TYPESIZE; 3352 tpacpi_inputdev->keycodesize = TPACPI_HOTKEY_MAP_TYPESIZE;
3355 tpacpi_inputdev->keycodemax = TPACPI_HOTKEY_MAP_LEN; 3353 tpacpi_inputdev->keycodemax = TPACPI_HOTKEY_MAP_LEN;
3356 tpacpi_inputdev->keycode = hotkey_keycode_map; 3354 tpacpi_inputdev->keycode = hotkey_keycode_map;
3357 for (i = 0; i < TPACPI_HOTKEY_MAP_LEN; i++) { 3355 for (i = 0; i < TPACPI_HOTKEY_MAP_LEN; i++) {
3358 if (hotkey_keycode_map[i] != KEY_RESERVED) { 3356 if (hotkey_keycode_map[i] != KEY_RESERVED) {
3359 set_bit(hotkey_keycode_map[i], 3357 input_set_capability(tpacpi_inputdev, EV_KEY,
3360 tpacpi_inputdev->keybit); 3358 hotkey_keycode_map[i]);
3361 } else { 3359 } else {
3362 if (i < sizeof(hotkey_reserved_mask)*8) 3360 if (i < sizeof(hotkey_reserved_mask)*8)
3363 hotkey_reserved_mask |= 1 << i; 3361 hotkey_reserved_mask |= 1 << i;
@@ -3365,12 +3363,10 @@ static int __init hotkey_init(struct ibm_init_struct *iibm)
3365 } 3363 }
3366 3364
3367 if (tp_features.hotkey_wlsw) { 3365 if (tp_features.hotkey_wlsw) {
3368 set_bit(EV_SW, tpacpi_inputdev->evbit); 3366 input_set_capability(tpacpi_inputdev, EV_SW, SW_RFKILL_ALL);
3369 set_bit(SW_RFKILL_ALL, tpacpi_inputdev->swbit);
3370 } 3367 }
3371 if (tp_features.hotkey_tablet) { 3368 if (tp_features.hotkey_tablet) {
3372 set_bit(EV_SW, tpacpi_inputdev->evbit); 3369 input_set_capability(tpacpi_inputdev, EV_SW, SW_TABLET_MODE);
3373 set_bit(SW_TABLET_MODE, tpacpi_inputdev->swbit);
3374 } 3370 }
3375 3371
3376 /* Do not issue duplicate brightness change events to 3372 /* Do not issue duplicate brightness change events to