diff options
Diffstat (limited to 'include/acpi/acpi_bus.h')
-rw-r--r-- | include/acpi/acpi_bus.h | 30 |
1 files changed, 4 insertions, 26 deletions
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h index c13c919ab99e..56e6b68c8d2f 100644 --- a/include/acpi/acpi_bus.h +++ b/include/acpi/acpi_bus.h | |||
@@ -63,13 +63,6 @@ acpi_get_physical_device_location(acpi_handle handle, struct acpi_pld_info **pld | |||
63 | #define ACPI_BUS_FILE_ROOT "acpi" | 63 | #define ACPI_BUS_FILE_ROOT "acpi" |
64 | extern struct proc_dir_entry *acpi_root_dir; | 64 | extern struct proc_dir_entry *acpi_root_dir; |
65 | 65 | ||
66 | enum acpi_bus_removal_type { | ||
67 | ACPI_BUS_REMOVAL_NORMAL = 0, | ||
68 | ACPI_BUS_REMOVAL_EJECT, | ||
69 | ACPI_BUS_REMOVAL_SUPRISE, | ||
70 | ACPI_BUS_REMOVAL_TYPE_COUNT | ||
71 | }; | ||
72 | |||
73 | enum acpi_bus_device_type { | 66 | enum acpi_bus_device_type { |
74 | ACPI_BUS_TYPE_DEVICE = 0, | 67 | ACPI_BUS_TYPE_DEVICE = 0, |
75 | ACPI_BUS_TYPE_POWER, | 68 | ACPI_BUS_TYPE_POWER, |
@@ -163,12 +156,10 @@ struct acpi_device_flags { | |||
163 | u32 dynamic_status:1; | 156 | u32 dynamic_status:1; |
164 | u32 removable:1; | 157 | u32 removable:1; |
165 | u32 ejectable:1; | 158 | u32 ejectable:1; |
166 | u32 suprise_removal_ok:1; | ||
167 | u32 power_manageable:1; | 159 | u32 power_manageable:1; |
168 | u32 performance_manageable:1; | ||
169 | u32 eject_pending:1; | 160 | u32 eject_pending:1; |
170 | u32 match_driver:1; | 161 | u32 match_driver:1; |
171 | u32 reserved:24; | 162 | u32 reserved:26; |
172 | }; | 163 | }; |
173 | 164 | ||
174 | /* File System */ | 165 | /* File System */ |
@@ -286,6 +277,7 @@ struct acpi_device_physical_node { | |||
286 | u8 node_id; | 277 | u8 node_id; |
287 | struct list_head node; | 278 | struct list_head node; |
288 | struct device *dev; | 279 | struct device *dev; |
280 | bool put_online:1; | ||
289 | }; | 281 | }; |
290 | 282 | ||
291 | /* set maximum of physical nodes to 32 for expansibility */ | 283 | /* set maximum of physical nodes to 32 for expansibility */ |
@@ -310,7 +302,6 @@ struct acpi_device { | |||
310 | struct acpi_driver *driver; | 302 | struct acpi_driver *driver; |
311 | void *driver_data; | 303 | void *driver_data; |
312 | struct device dev; | 304 | struct device dev; |
313 | enum acpi_bus_removal_type removal_type; /* indicate for different removal type */ | ||
314 | u8 physical_node_count; | 305 | u8 physical_node_count; |
315 | struct list_head physical_node_list; | 306 | struct list_head physical_node_list; |
316 | struct mutex physical_node_lock; | 307 | struct mutex physical_node_lock; |
@@ -443,7 +434,6 @@ int register_acpi_bus_type(struct acpi_bus_type *); | |||
443 | int unregister_acpi_bus_type(struct acpi_bus_type *); | 434 | int unregister_acpi_bus_type(struct acpi_bus_type *); |
444 | 435 | ||
445 | struct acpi_pci_root { | 436 | struct acpi_pci_root { |
446 | struct list_head node; | ||
447 | struct acpi_device * device; | 437 | struct acpi_device * device; |
448 | struct pci_bus *bus; | 438 | struct pci_bus *bus; |
449 | u16 segment; | 439 | u16 segment; |
@@ -468,8 +458,6 @@ acpi_status acpi_add_pm_notifier(struct acpi_device *adev, | |||
468 | acpi_notify_handler handler, void *context); | 458 | acpi_notify_handler handler, void *context); |
469 | acpi_status acpi_remove_pm_notifier(struct acpi_device *adev, | 459 | acpi_status acpi_remove_pm_notifier(struct acpi_device *adev, |
470 | acpi_notify_handler handler); | 460 | acpi_notify_handler handler); |
471 | int acpi_device_power_state(struct device *dev, struct acpi_device *adev, | ||
472 | u32 target_state, int d_max_in, int *d_min_p); | ||
473 | int acpi_pm_device_sleep_state(struct device *, int *, int); | 461 | int acpi_pm_device_sleep_state(struct device *, int *, int); |
474 | void acpi_dev_pm_add_dependent(acpi_handle handle, struct device *depdev); | 462 | void acpi_dev_pm_add_dependent(acpi_handle handle, struct device *depdev); |
475 | void acpi_dev_pm_remove_dependent(acpi_handle handle, struct device *depdev); | 463 | void acpi_dev_pm_remove_dependent(acpi_handle handle, struct device *depdev); |
@@ -485,23 +473,13 @@ static inline acpi_status acpi_remove_pm_notifier(struct acpi_device *adev, | |||
485 | { | 473 | { |
486 | return AE_SUPPORT; | 474 | return AE_SUPPORT; |
487 | } | 475 | } |
488 | static inline int __acpi_device_power_state(int m, int *p) | 476 | static inline int acpi_pm_device_sleep_state(struct device *d, int *p, int m) |
489 | { | 477 | { |
490 | if (p) | 478 | if (p) |
491 | *p = ACPI_STATE_D0; | 479 | *p = ACPI_STATE_D0; |
480 | |||
492 | return (m >= ACPI_STATE_D0 && m <= ACPI_STATE_D3) ? m : ACPI_STATE_D0; | 481 | return (m >= ACPI_STATE_D0 && m <= ACPI_STATE_D3) ? m : ACPI_STATE_D0; |
493 | } | 482 | } |
494 | static inline int acpi_device_power_state(struct device *dev, | ||
495 | struct acpi_device *adev, | ||
496 | u32 target_state, int d_max_in, | ||
497 | int *d_min_p) | ||
498 | { | ||
499 | return __acpi_device_power_state(d_max_in, d_min_p); | ||
500 | } | ||
501 | static inline int acpi_pm_device_sleep_state(struct device *d, int *p, int m) | ||
502 | { | ||
503 | return __acpi_device_power_state(m, p); | ||
504 | } | ||
505 | static inline void acpi_dev_pm_add_dependent(acpi_handle handle, | 483 | static inline void acpi_dev_pm_add_dependent(acpi_handle handle, |
506 | struct device *depdev) {} | 484 | struct device *depdev) {} |
507 | static inline void acpi_dev_pm_remove_dependent(acpi_handle handle, | 485 | static inline void acpi_dev_pm_remove_dependent(acpi_handle handle, |