diff options
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/scan.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index fd17fe7f93f2..9a9298994e26 100644 --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c | |||
@@ -922,12 +922,17 @@ static void acpi_device_notify(acpi_handle handle, u32 event, void *data) | |||
922 | device->driver->ops.notify(device, event); | 922 | device->driver->ops.notify(device, event); |
923 | } | 923 | } |
924 | 924 | ||
925 | static acpi_status acpi_device_notify_fixed(void *data) | 925 | static void acpi_device_notify_fixed(void *data) |
926 | { | 926 | { |
927 | struct acpi_device *device = data; | 927 | struct acpi_device *device = data; |
928 | 928 | ||
929 | /* Fixed hardware devices have no handles */ | 929 | /* Fixed hardware devices have no handles */ |
930 | acpi_device_notify(NULL, ACPI_FIXED_HARDWARE_EVENT, device); | 930 | acpi_device_notify(NULL, ACPI_FIXED_HARDWARE_EVENT, device); |
931 | } | ||
932 | |||
933 | static acpi_status acpi_device_fixed_event(void *data) | ||
934 | { | ||
935 | acpi_os_execute(OSL_NOTIFY_HANDLER, acpi_device_notify_fixed, data); | ||
931 | return AE_OK; | 936 | return AE_OK; |
932 | } | 937 | } |
933 | 938 | ||
@@ -938,12 +943,12 @@ static int acpi_device_install_notify_handler(struct acpi_device *device) | |||
938 | if (device->device_type == ACPI_BUS_TYPE_POWER_BUTTON) | 943 | if (device->device_type == ACPI_BUS_TYPE_POWER_BUTTON) |
939 | status = | 944 | status = |
940 | acpi_install_fixed_event_handler(ACPI_EVENT_POWER_BUTTON, | 945 | acpi_install_fixed_event_handler(ACPI_EVENT_POWER_BUTTON, |
941 | acpi_device_notify_fixed, | 946 | acpi_device_fixed_event, |
942 | device); | 947 | device); |
943 | else if (device->device_type == ACPI_BUS_TYPE_SLEEP_BUTTON) | 948 | else if (device->device_type == ACPI_BUS_TYPE_SLEEP_BUTTON) |
944 | status = | 949 | status = |
945 | acpi_install_fixed_event_handler(ACPI_EVENT_SLEEP_BUTTON, | 950 | acpi_install_fixed_event_handler(ACPI_EVENT_SLEEP_BUTTON, |
946 | acpi_device_notify_fixed, | 951 | acpi_device_fixed_event, |
947 | device); | 952 | device); |
948 | else | 953 | else |
949 | status = acpi_install_notify_handler(device->handle, | 954 | status = acpi_install_notify_handler(device->handle, |
@@ -960,10 +965,10 @@ static void acpi_device_remove_notify_handler(struct acpi_device *device) | |||
960 | { | 965 | { |
961 | if (device->device_type == ACPI_BUS_TYPE_POWER_BUTTON) | 966 | if (device->device_type == ACPI_BUS_TYPE_POWER_BUTTON) |
962 | acpi_remove_fixed_event_handler(ACPI_EVENT_POWER_BUTTON, | 967 | acpi_remove_fixed_event_handler(ACPI_EVENT_POWER_BUTTON, |
963 | acpi_device_notify_fixed); | 968 | acpi_device_fixed_event); |
964 | else if (device->device_type == ACPI_BUS_TYPE_SLEEP_BUTTON) | 969 | else if (device->device_type == ACPI_BUS_TYPE_SLEEP_BUTTON) |
965 | acpi_remove_fixed_event_handler(ACPI_EVENT_SLEEP_BUTTON, | 970 | acpi_remove_fixed_event_handler(ACPI_EVENT_SLEEP_BUTTON, |
966 | acpi_device_notify_fixed); | 971 | acpi_device_fixed_event); |
967 | else | 972 | else |
968 | acpi_remove_notify_handler(device->handle, ACPI_DEVICE_NOTIFY, | 973 | acpi_remove_notify_handler(device->handle, ACPI_DEVICE_NOTIFY, |
969 | acpi_device_notify); | 974 | acpi_device_notify); |