summaryrefslogtreecommitdiff
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 ae862f1798d..cdfecc0a2ac 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)
{
int result = 0;
struct acpi_device *device = NULL;
+ struct acpi_driver *driver;
blocking_notifier_call_chain(&acpi_bus_notify_list,
type, (void *)handle);
@@ -629,7 +630,10 @@ static void acpi_bus_notify(acpi_handle handle, u32 type, void *data)
break;
}
- return;
+ driver = device->driver;
+ if (driver && driver->ops.notify &&
+ (driver->flags & ACPI_DRIVER_ALL_NOTIFY_EVENTS))
+ driver->ops.notify(device, type);
}
/* --------------------------------------------------------------------------
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h
index c34b1102290..84e35d5646a 100644
--- a/include/acpi/acpi_bus.h
+++ b/include/acpi/acpi_bus.h
@@ -114,10 +114,13 @@ struct acpi_device_ops {
acpi_op_notify notify;
};
+#define ACPI_DRIVER_ALL_NOTIFY_EVENTS 0x1 /* system AND device events */
+
struct acpi_driver {
char name[80];
char class[80];
const struct acpi_device_id *ids; /* Supported Hardware IDs */
+ unsigned int flags;
struct acpi_device_ops ops;
struct device_driver drv;
struct module *owner;