Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 166377
b: refs/heads/master
c: ccba2a3
h: refs/heads/master
i:
  166375: 395cc2b
v: v3
  • Loading branch information
Bjorn Helgaas authored and Len Brown committed Sep 25, 2009
1 parent 53295dc commit 9780e25
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: caaa6efb3d82d0102db9e7094ca5773c46e6780c
refs/heads/master: ccba2a36d74a9da815e597ac727cfd096fa8e750
10 changes: 4 additions & 6 deletions trunk/drivers/acpi/scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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
Expand Down

0 comments on commit 9780e25

Please sign in to comment.