mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
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 <[email protected]> Signed-off-by: Len Brown <[email protected]>
This commit is contained in:
parent
1d268b0a0f
commit
d43ec68e98
2 changed files with 3 additions and 5 deletions
|
|
@ -136,6 +136,7 @@ struct acpi_driver {
|
|||
atomic_t references;
|
||||
char *ids; /* Supported Hardware IDs */
|
||||
struct acpi_device_ops ops;
|
||||
struct device_driver drv;
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
@ -301,6 +302,8 @@ struct acpi_device {
|
|||
};
|
||||
|
||||
#define acpi_driver_data(d) ((d)->driver_data)
|
||||
#define to_acpi_device(d) container_of(d, struct acpi_device, dev)
|
||||
#define to_acpi_driver(d) container_of(d, struct acpi_driver, drv)
|
||||
|
||||
/*
|
||||
* Events
|
||||
|
|
|
|||
Loading…
Reference in a new issue