diff options
author | Patrick Mochel <mochel@linux.intel.com> | 2006-12-07 07:56:23 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2006-12-15 23:38:34 -0500 |
commit | d43ec68e9837dfa6618ab473622683fdbf6e68a9 (patch) | |
tree | 4de061cb0d21bea939ba3ff549785dd4b0dc6f48 /include/acpi | |
parent | 1d268b0a0f5407138caf0dec9559d68e657a3a74 (diff) |
ACPI: add device_driver and hepler functions
Add device_driver into acpi_driver for driver model.
Add helper functions 'to_acpi_device' and 'to_acpi_driver'
to get structure acpi_device/acpi_driver by device/device_driver.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'include/acpi')
-rw-r--r-- | include/acpi/acpi_bus.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h index fdd10953b2b6..a09538eb61e7 100644 --- a/include/acpi/acpi_bus.h +++ b/include/acpi/acpi_bus.h | |||
@@ -136,6 +136,7 @@ struct acpi_driver { | |||
136 | atomic_t references; | 136 | atomic_t references; |
137 | char *ids; /* Supported Hardware IDs */ | 137 | char *ids; /* Supported Hardware IDs */ |
138 | struct acpi_device_ops ops; | 138 | struct acpi_device_ops ops; |
139 | struct device_driver drv; | ||
139 | }; | 140 | }; |
140 | 141 | ||
141 | /* | 142 | /* |
@@ -301,6 +302,8 @@ struct acpi_device { | |||
301 | }; | 302 | }; |
302 | 303 | ||
303 | #define acpi_driver_data(d) ((d)->driver_data) | 304 | #define acpi_driver_data(d) ((d)->driver_data) |
305 | #define to_acpi_device(d) container_of(d, struct acpi_device, dev) | ||
306 | #define to_acpi_driver(d) container_of(d, struct acpi_driver, drv) | ||
304 | 307 | ||
305 | /* | 308 | /* |
306 | * Events | 309 | * Events |