aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/acpi/bus.c6
-rw-r--r--include/acpi/acpi_bus.h3
2 files changed, 8 insertions, 1 deletions
diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c
index ae862f1798dc..cdfecc0a2ac6 100644
--- a/drivers/acpi/bus.c
+++ b/drivers/acpi/bus.c
@@ -549,6 +549,7 @@ static void acpi_bus_notify(acpi_handle handle, u32 type, void *data)
549{ 549{
550 int result = 0; 550 int result = 0;
551 struct acpi_device *device = NULL; 551 struct acpi_device *device = NULL;
552 struct acpi_driver *driver;
552 553
553 blocking_notifier_call_chain(&acpi_bus_notify_list, 554 blocking_notifier_call_chain(&acpi_bus_notify_list,
554 type, (void *)handle); 555 type, (void *)handle);
@@ -629,7 +630,10 @@ static void acpi_bus_notify(acpi_handle handle, u32 type, void *data)
629 break; 630 break;
630 } 631 }
631 632
632 return; 633 driver = device->driver;
634 if (driver && driver->ops.notify &&
635 (driver->flags & ACPI_DRIVER_ALL_NOTIFY_EVENTS))
636 driver->ops.notify(device, type);
633} 637}
634 638
635/* -------------------------------------------------------------------------- 639/* --------------------------------------------------------------------------
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h
index c34b11022908..84e35d5646a1 100644
--- a/include/acpi/acpi_bus.h
+++ b/include/acpi/acpi_bus.h
@@ -114,10 +114,13 @@ struct acpi_device_ops {
114 acpi_op_notify notify; 114 acpi_op_notify notify;
115}; 115};
116 116
117#define ACPI_DRIVER_ALL_NOTIFY_EVENTS 0x1 /* system AND device events */
118
117struct acpi_driver { 119struct acpi_driver {
118 char name[80]; 120 char name[80];
119 char class[80]; 121 char class[80];
120 const struct acpi_device_id *ids; /* Supported Hardware IDs */ 122 const struct acpi_device_id *ids; /* Supported Hardware IDs */
123 unsigned int flags;
121 struct acpi_device_ops ops; 124 struct acpi_device_ops ops;
122 struct device_driver drv; 125 struct device_driver drv;
123 struct module *owner; 126 struct module *owner;