99#ifndef __ACPI_BUS_H__
1010#define __ACPI_BUS_H__
1111
12+ #include <linux/completion.h>
13+ #include <linux/container_of.h>
1214#include <linux/device.h>
15+ #include <linux/kobject.h>
16+ #include <linux/mutex.h>
1317#include <linux/property.h>
18+ #include <linux/types.h>
1419
1520struct acpi_handle_list {
1621 u32 count ;
@@ -124,8 +129,8 @@ static inline struct acpi_hotplug_profile *to_acpi_hotplug_profile(
124129}
125130
126131struct acpi_scan_handler {
127- const struct acpi_device_id * ids ;
128132 struct list_head list_node ;
133+ const struct acpi_device_id * ids ;
129134 bool (* match )(const char * idstr , const struct acpi_device_id * * matchid );
130135 int (* attach )(struct acpi_device * dev , const struct acpi_device_id * id );
131136 void (* detach )(struct acpi_device * dev );
@@ -139,11 +144,15 @@ struct acpi_scan_handler {
139144 * --------------------
140145 */
141146
147+ typedef int (* acpi_hp_notify ) (struct acpi_device * , u32 );
148+ typedef void (* acpi_hp_uevent ) (struct acpi_device * , u32 );
149+ typedef void (* acpi_hp_fixup ) (struct acpi_device * );
150+
142151struct acpi_hotplug_context {
143152 struct acpi_device * self ;
144- int ( * notify )( struct acpi_device * , u32 ) ;
145- void ( * uevent )( struct acpi_device * , u32 ) ;
146- void ( * fixup )( struct acpi_device * ) ;
153+ acpi_hp_notify notify ;
154+ acpi_hp_uevent uevent ;
155+ acpi_hp_fixup fixup ;
147156};
148157
149158/*
@@ -269,14 +278,14 @@ struct acpi_device_power_flags {
269278};
270279
271280struct acpi_device_power_state {
281+ struct list_head resources ; /* Power resources referenced */
272282 struct {
273283 u8 valid :1 ;
274284 u8 explicit_set :1 ; /* _PSx present? */
275285 u8 reserved :6 ;
276286 } flags ;
277287 int power ; /* % Power (compared to D0) */
278288 int latency ; /* Dx->D0 time (microseconds) */
279- struct list_head resources ; /* Power resources referenced */
280289};
281290
282291struct acpi_device_power {
@@ -342,16 +351,16 @@ struct acpi_device_wakeup {
342351};
343352
344353struct acpi_device_physical_node {
345- unsigned int node_id ;
346354 struct list_head node ;
347355 struct device * dev ;
356+ unsigned int node_id ;
348357 bool put_online :1 ;
349358};
350359
351360struct acpi_device_properties {
361+ struct list_head list ;
352362 const guid_t * guid ;
353363 union acpi_object * properties ;
354- struct list_head list ;
355364 void * * bufs ;
356365};
357366
@@ -488,12 +497,12 @@ struct acpi_device {
488497
489498/* Non-device subnode */
490499struct acpi_data_node {
500+ struct list_head sibling ;
491501 const char * name ;
492502 acpi_handle handle ;
493503 struct fwnode_handle fwnode ;
494504 struct fwnode_handle * parent ;
495505 struct acpi_device_data data ;
496- struct list_head sibling ;
497506 struct kobject kobj ;
498507 struct completion kobj_done ;
499508};
@@ -578,8 +587,7 @@ static inline void acpi_set_hp_context(struct acpi_device *adev,
578587
579588void acpi_initialize_hp_context (struct acpi_device * adev ,
580589 struct acpi_hotplug_context * hp ,
581- int (* notify )(struct acpi_device * , u32 ),
582- void (* uevent )(struct acpi_device * , u32 ));
590+ acpi_hp_notify notify , acpi_hp_uevent uevent );
583591
584592/* acpi_device.dev.bus == &acpi_bus_type */
585593extern const struct bus_type acpi_bus_type ;
0 commit comments