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 ccae305ee55d..0dc44945725e 100644 --- a/drivers/acpi/bus.c +++ b/drivers/acpi/bus.c | |||
@@ -496,6 +496,19 @@ static int acpi_bus_check_scope(struct acpi_device *device) | |||
496 | return 0; | 496 | return 0; |
497 | } | 497 | } |
498 | 498 | ||
499 | static BLOCKING_NOTIFIER_HEAD(acpi_bus_notify_list); | ||
500 | int register_acpi_bus_notifier(struct notifier_block *nb) | ||
501 | { | ||
502 | return blocking_notifier_chain_register(&acpi_bus_notify_list, nb); | ||
503 | } | ||
504 | EXPORT_SYMBOL_GPL(register_acpi_bus_notifier); | ||
505 | |||
506 | void unregister_acpi_bus_notifier(struct notifier_block *nb) | ||
507 | { | ||
508 | blocking_notifier_chain_unregister(&acpi_bus_notify_list, nb); | ||
509 | } | ||
510 | EXPORT_SYMBOL_GPL(unregister_acpi_bus_notifier); | ||
511 | |||
499 | /** | 512 | /** |
500 | * acpi_bus_notify | 513 | * acpi_bus_notify |
501 | * --------------- | 514 | * --------------- |
@@ -506,6 +519,8 @@ static void acpi_bus_notify(acpi_handle handle, u32 type, void *data) | |||
506 | int result = 0; | 519 | int result = 0; |
507 | struct acpi_device *device = NULL; | 520 | struct acpi_device *device = NULL; |
508 | 521 | ||
522 | blocking_notifier_call_chain(&acpi_bus_notify_list, | ||
523 | type, (void *)handle); | ||
509 | 524 | ||
510 | if (acpi_bus_get_device(handle, &device)) | 525 | if (acpi_bus_get_device(handle, &device)) |
511 | return; | 526 | return; |