Skip to content

Commit

Permalink
ideapad: generate valid key event only
Browse files Browse the repository at this point in the history
Otherwise will generate KEY_UNKNOWN on un-listed vpc event,
which means nothing and is hard for user to report the detail
of the event.

Signed-off-by: Ike Panhc <ike.pan@canonical.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
  • Loading branch information
Ike Panhc authored and Matthew Garrett committed May 31, 2012
1 parent a5c3892 commit 20a769c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion drivers/platform/x86/ideapad-laptop.c
Original file line number Diff line number Diff line change
Expand Up @@ -784,6 +784,10 @@ static void ideapad_acpi_notify(struct acpi_device *adevice, u32 event)
case 9:
ideapad_sync_rfk_state(priv);
break;
case 13:
case 6:
ideapad_input_report(priv, vpc_bit);
break;
case 4:
ideapad_backlight_notify_brightness(priv);
break;
Expand All @@ -794,7 +798,7 @@ static void ideapad_acpi_notify(struct acpi_device *adevice, u32 event)
ideapad_backlight_notify_power(priv);
break;
default:
ideapad_input_report(priv, vpc_bit);
pr_info("Unknown event: %lu\n", vpc_bit);
}
}
}
Expand Down

0 comments on commit 20a769c

Please sign in to comment.