diff options
Diffstat (limited to 'drivers/acpi/button.c')
-rw-r--r-- | drivers/acpi/button.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c index a55773801c5f..c971929d75c2 100644 --- a/drivers/acpi/button.c +++ b/drivers/acpi/button.c | |||
@@ -383,18 +383,15 @@ static int acpi_button_add(struct acpi_device *device) | |||
383 | 383 | ||
384 | switch (button->type) { | 384 | switch (button->type) { |
385 | case ACPI_BUTTON_TYPE_POWER: | 385 | case ACPI_BUTTON_TYPE_POWER: |
386 | input->evbit[0] = BIT_MASK(EV_KEY); | 386 | input_set_capability(input, EV_KEY, KEY_POWER); |
387 | set_bit(KEY_POWER, input->keybit); | ||
388 | break; | 387 | break; |
389 | 388 | ||
390 | case ACPI_BUTTON_TYPE_SLEEP: | 389 | case ACPI_BUTTON_TYPE_SLEEP: |
391 | input->evbit[0] = BIT_MASK(EV_KEY); | 390 | input_set_capability(input, EV_KEY, KEY_SLEEP); |
392 | set_bit(KEY_SLEEP, input->keybit); | ||
393 | break; | 391 | break; |
394 | 392 | ||
395 | case ACPI_BUTTON_TYPE_LID: | 393 | case ACPI_BUTTON_TYPE_LID: |
396 | input->evbit[0] = BIT_MASK(EV_SW); | 394 | input_set_capability(input, EV_SW, SW_LID); |
397 | set_bit(SW_LID, input->swbit); | ||
398 | break; | 395 | break; |
399 | } | 396 | } |
400 | 397 | ||