Subject: [PATCH] [acpi driver model] Add d_event field to struct acpi_device_driver Signed-off-by: Patrick Mochel --- include/acpi/driver.h | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-) applies-to: ee100ad4d3378811f13f8d046125c7de3b8b3ba2 1f1f7b9df5e3e1f44547344bd91dd37621b8da8f diff --git a/include/acpi/driver.h b/include/acpi/driver.h index 29c0cc4..5bffb20 100644 --- a/include/acpi/driver.h +++ b/include/acpi/driver.h @@ -3,12 +3,14 @@ #define _INCLUDE_ACPI_DRIVER_ #include +#include struct acpi_device_driver { const char ** d_ids; const u32 d_num_ids; + struct acpi_device_event * d_event; int (*d_add) (struct acpi_dev * ad); int (*d_remove) (struct acpi_dev * ad); @@ -65,6 +67,9 @@ static int __name##_resume(struct acpi_d +#define __decl_externs(__name) \ +acpi_device_event_extern(__name); + #define __decl_acpi_ids(__name, ...) \ static const char * __name##_ids[] = { __VA_ARGS__ } @@ -73,6 +78,8 @@ static struct acpi_device_driver __name# .d_ids = __name##_ids, \ .d_num_ids = ARRAY_SIZE(__name##_ids), \ \ + .d_event = acpi_device_event_ref(__name),\ + \ .d_add = __name##_add, \ .d_remove = __name##_remove, \ \ @@ -100,7 +107,10 @@ static void acpi_##__name##_exit(void) } \ module_exit(acpi_##__name##_exit); + + #define declare_acpi_driver(__name, ...) \ + __decl_externs(__name); \ __decl_acpi_ids(__name, __VA_ARGS__ ); \ __decl_acpi_driver(__name); \ __acpi_driver_init(__name); --- 0.99.9.GIT