diff options
Diffstat (limited to 'drivers/acpi/bus.c')
-rw-r--r-- | drivers/acpi/bus.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c index e9b116d2b56d..e6311f432edf 100644 --- a/drivers/acpi/bus.c +++ b/drivers/acpi/bus.c | |||
@@ -525,6 +525,19 @@ static int acpi_bus_check_scope(struct acpi_device *device) | |||
525 | return 0; | 525 | return 0; |
526 | } | 526 | } |
527 | 527 | ||
528 | static BLOCKING_NOTIFIER_HEAD(acpi_bus_notify_list); | ||
529 | int register_acpi_bus_notifier(struct notifier_block *nb) | ||
530 | { | ||
531 | return blocking_notifier_chain_register(&acpi_bus_notify_list, nb); | ||
532 | } | ||
533 | EXPORT_SYMBOL_GPL(register_acpi_bus_notifier); | ||
534 | |||
535 | void unregister_acpi_bus_notifier(struct notifier_block *nb) | ||
536 | { | ||
537 | blocking_notifier_chain_unregister(&acpi_bus_notify_list, nb); | ||
538 | } | ||
539 | EXPORT_SYMBOL_GPL(unregister_acpi_bus_notifier); | ||
540 | |||
528 | /** | 541 | /** |
529 | * acpi_bus_notify | 542 | * acpi_bus_notify |
530 | * --------------- | 543 | * --------------- |
@@ -535,6 +548,8 @@ static void acpi_bus_notify(acpi_handle handle, u32 type, void *data) | |||
535 | int result = 0; | 548 | int result = 0; |
536 | struct acpi_device *device = NULL; | 549 | struct acpi_device *device = NULL; |
537 | 550 | ||
551 | blocking_notifier_call_chain(&acpi_bus_notify_list, | ||
552 | type, (void *)handle); | ||
538 | 553 | ||
539 | if (acpi_bus_get_device(handle, &device)) | 554 | if (acpi_bus_get_device(handle, &device)) |
540 | return; | 555 | return; |