diff options
author | Bjorn Helgaas <bjorn.helgaas@hp.com> | 2009-09-21 19:29:15 +0000 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2009-09-25 14:24:25 -0400 |
commit | ccba2a36d74a9da815e597ac727cfd096fa8e750 (patch) | |
tree | 2fc51fdcf0cc3e7fefcf35b6d25da2f7edede24c /drivers/acpi | |
parent | caaa6efb3d82d0102db9e7094ca5773c46e6780c (diff) | |
download | linux-ccba2a36d74a9da815e597ac727cfd096fa8e750.tar.gz linux-ccba2a36d74a9da815e597ac727cfd096fa8e750.tar.bz2 linux-ccba2a36d74a9da815e597ac727cfd096fa8e750.zip |
ACPI: use device_type rather than comparing HID
Check the acpi_device device_type rather than the HID.
Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/scan.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index c73681b7e69e..c8e867b4a842 100644 --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c @@ -378,15 +378,13 @@ static acpi_status acpi_device_notify_fixed(void *data) static int acpi_device_install_notify_handler(struct acpi_device *device) { acpi_status status; - char *hid; - hid = acpi_device_hid(device); - if (!strcmp(hid, ACPI_BUTTON_HID_POWERF)) + if (device->device_type == ACPI_BUS_TYPE_POWER_BUTTON) status = acpi_install_fixed_event_handler(ACPI_EVENT_POWER_BUTTON, acpi_device_notify_fixed, device); - else if (!strcmp(hid, ACPI_BUTTON_HID_SLEEPF)) + else if (device->device_type == ACPI_BUS_TYPE_SLEEP_BUTTON) status = acpi_install_fixed_event_handler(ACPI_EVENT_SLEEP_BUTTON, acpi_device_notify_fixed, @@ -404,10 +402,10 @@ static int acpi_device_install_notify_handler(struct acpi_device *device) static void acpi_device_remove_notify_handler(struct acpi_device *device) { - if (!strcmp(acpi_device_hid(device), ACPI_BUTTON_HID_POWERF)) + if (device->device_type == ACPI_BUS_TYPE_POWER_BUTTON) acpi_remove_fixed_event_handler(ACPI_EVENT_POWER_BUTTON, acpi_device_notify_fixed); - else if (!strcmp(acpi_device_hid(device), ACPI_BUTTON_HID_SLEEPF)) + else if (device->device_type == ACPI_BUS_TYPE_SLEEP_BUTTON) acpi_remove_fixed_event_handler(ACPI_EVENT_SLEEP_BUTTON, acpi_device_notify_fixed); else |