diff options
Diffstat (limited to 'include/acpi/acpi_bus.h')
-rw-r--r-- | include/acpi/acpi_bus.h | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h index aef0e55253a9..0d9f984a60a1 100644 --- a/include/acpi/acpi_bus.h +++ b/include/acpi/acpi_bus.h | |||
@@ -91,13 +91,12 @@ typedef int (*acpi_op_remove) (struct acpi_device * device, int type); | |||
91 | typedef int (*acpi_op_lock) (struct acpi_device * device, int type); | 91 | typedef int (*acpi_op_lock) (struct acpi_device * device, int type); |
92 | typedef int (*acpi_op_start) (struct acpi_device * device); | 92 | typedef int (*acpi_op_start) (struct acpi_device * device); |
93 | typedef int (*acpi_op_stop) (struct acpi_device * device, int type); | 93 | typedef int (*acpi_op_stop) (struct acpi_device * device, int type); |
94 | typedef int (*acpi_op_suspend) (struct acpi_device * device, int state); | 94 | typedef int (*acpi_op_suspend) (struct acpi_device * device, pm_message_t state); |
95 | typedef int (*acpi_op_resume) (struct acpi_device * device, int state); | 95 | typedef int (*acpi_op_resume) (struct acpi_device * device); |
96 | typedef int (*acpi_op_scan) (struct acpi_device * device); | 96 | typedef int (*acpi_op_scan) (struct acpi_device * device); |
97 | typedef int (*acpi_op_bind) (struct acpi_device * device); | 97 | typedef int (*acpi_op_bind) (struct acpi_device * device); |
98 | typedef int (*acpi_op_unbind) (struct acpi_device * device); | 98 | typedef int (*acpi_op_unbind) (struct acpi_device * device); |
99 | typedef int (*acpi_op_match) (struct acpi_device * device, | 99 | typedef int (*acpi_op_shutdown) (struct acpi_device * device); |
100 | struct acpi_driver * driver); | ||
101 | 100 | ||
102 | struct acpi_bus_ops { | 101 | struct acpi_bus_ops { |
103 | u32 acpi_op_add:1; | 102 | u32 acpi_op_add:1; |
@@ -110,7 +109,7 @@ struct acpi_bus_ops { | |||
110 | u32 acpi_op_scan:1; | 109 | u32 acpi_op_scan:1; |
111 | u32 acpi_op_bind:1; | 110 | u32 acpi_op_bind:1; |
112 | u32 acpi_op_unbind:1; | 111 | u32 acpi_op_unbind:1; |
113 | u32 acpi_op_match:1; | 112 | u32 acpi_op_shutdown:1; |
114 | u32 reserved:21; | 113 | u32 reserved:21; |
115 | }; | 114 | }; |
116 | 115 | ||
@@ -125,16 +124,16 @@ struct acpi_device_ops { | |||
125 | acpi_op_scan scan; | 124 | acpi_op_scan scan; |
126 | acpi_op_bind bind; | 125 | acpi_op_bind bind; |
127 | acpi_op_unbind unbind; | 126 | acpi_op_unbind unbind; |
128 | acpi_op_match match; | 127 | acpi_op_shutdown shutdown; |
129 | }; | 128 | }; |
130 | 129 | ||
131 | struct acpi_driver { | 130 | struct acpi_driver { |
132 | struct list_head node; | ||
133 | char name[80]; | 131 | char name[80]; |
134 | char class[80]; | 132 | char class[80]; |
135 | atomic_t references; | ||
136 | char *ids; /* Supported Hardware IDs */ | 133 | char *ids; /* Supported Hardware IDs */ |
137 | struct acpi_device_ops ops; | 134 | struct acpi_device_ops ops; |
135 | struct device_driver drv; | ||
136 | struct module *owner; | ||
138 | }; | 137 | }; |
139 | 138 | ||
140 | /* | 139 | /* |
@@ -184,7 +183,7 @@ struct acpi_device_dir { | |||
184 | 183 | ||
185 | typedef char acpi_bus_id[5]; | 184 | typedef char acpi_bus_id[5]; |
186 | typedef unsigned long acpi_bus_address; | 185 | typedef unsigned long acpi_bus_address; |
187 | typedef char acpi_hardware_id[9]; | 186 | typedef char acpi_hardware_id[15]; |
188 | typedef char acpi_unique_id[9]; | 187 | typedef char acpi_unique_id[9]; |
189 | typedef char acpi_device_name[40]; | 188 | typedef char acpi_device_name[40]; |
190 | typedef char acpi_device_class[20]; | 189 | typedef char acpi_device_class[20]; |
@@ -295,11 +294,14 @@ struct acpi_device { | |||
295 | struct acpi_device_ops ops; | 294 | struct acpi_device_ops ops; |
296 | struct acpi_driver *driver; | 295 | struct acpi_driver *driver; |
297 | void *driver_data; | 296 | void *driver_data; |
298 | struct kobject kobj; | ||
299 | struct device dev; | 297 | struct device dev; |
298 | struct acpi_bus_ops bus_ops; /* workaround for different code path for hotplug */ | ||
299 | enum acpi_bus_removal_type removal_type; /* indicate for different removal type */ | ||
300 | }; | 300 | }; |
301 | 301 | ||
302 | #define acpi_driver_data(d) ((d)->driver_data) | 302 | #define acpi_driver_data(d) ((d)->driver_data) |
303 | #define to_acpi_device(d) container_of(d, struct acpi_device, dev) | ||
304 | #define to_acpi_driver(d) container_of(d, struct acpi_driver, drv) | ||
303 | 305 | ||
304 | /* | 306 | /* |
305 | * Events | 307 | * Events |