toshiba_acpi: Fix machines that don't support HCI_SYSTEM_EVENT
authorSeth Forshee <seth.forshee@canonical.com>
Wed, 16 Nov 2011 23:37:45 +0000 (17:37 -0600)
committerMatthew Garrett <mjg@redhat.com>
Mon, 5 Dec 2011 18:07:28 +0000 (13:07 -0500)
commit11948b9335865dc0ba3a5ca2c9c255291a8d50fb
treee24f2c1b938d99ab6ed49fdd3ee122b074e3221e
parent8e8da023f5af71662867729db5547dc54786093c
toshiba_acpi: Fix machines that don't support HCI_SYSTEM_EVENT

The Satellite C670-10V generates notifications for hotkeys but does
not support HCI_SYSTEM_EVENT. As a result when a hotkey is pressed
it gets stuck in an infinite loop in toshiba_acpi_notify. To fix
this, detect whether or not HCI_SYSTEM_EVENT is supported up-front
and don't try to read system events if it isn't supported. In
addition, limit the number of retries when reading HCI_SYSTEM_EVENT
fails so that this loop cannot run unbounded.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
drivers/platform/x86/toshiba_acpi.c