diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-02-15 07:58:30 -0500 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-02-15 07:58:30 -0500 |
commit | e8f71df723339b6d3861886f58c245812d1994f8 (patch) | |
tree | 77264d37afeff152816afa1fea7b960dc8cbbd1e /include/acpi | |
parent | b34bf8e3cd5039ccba7f478601188427b1a8cd0b (diff) | |
parent | 3757b94802fb65d8f696597a74053cf21738da0b (diff) |
Merge branch 'acpi-cleanup'
* acpi-cleanup: (21 commits)
ACPI / hotplug: Fix concurrency issues and memory leaks
ACPI: Remove the use of CONFIG_ACPI_CONTAINER_MODULE
ACPI / scan: Full transition to D3cold in acpi_device_unregister()
ACPI / scan: Make acpi_bus_hot_remove_device() acquire the scan lock
ACPI: Drop the container.h header file
ACPI / Documentation: refer to correct file for acpi_platform_device_ids[] table
ACPI / scan: Make container driver use struct acpi_scan_handler
ACPI / scan: Remove useless #ifndef from acpi_eject_store()
ACPI: Unbind ACPI drv when probe failed
ACPI: sysfs eject support for ACPI scan handlers
ACPI / scan: Follow priorities of IDs when matching scan handlers
ACPI / PCI: pci_slot: replace printk(KERN_xxx) with pr_xxx()
ACPI / dock: Fix acpi_bus_get_device() check in drivers/acpi/dock.c
ACPI / scan: Clean up acpi_bus_get_parent()
ACPI / platform: Use struct acpi_scan_handler for creating devices
ACPI / PCI: Make PCI IRQ link driver use struct acpi_scan_handler
ACPI / PCI: Make PCI root driver use struct acpi_scan_handler
ACPI / scan: Introduce struct acpi_scan_handler
ACPI / scan: Make scanning of fixed devices follow the general scheme
ACPI: Drop device start operation that is not used
...
Diffstat (limited to 'include/acpi')
-rw-r--r-- | include/acpi/acpi_bus.h | 21 | ||||
-rw-r--r-- | include/acpi/container.h | 12 |
2 files changed, 18 insertions, 15 deletions
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h index 36ed7e025bfc..227ba7dc293d 100644 --- a/include/acpi/acpi_bus.h +++ b/include/acpi/acpi_bus.h | |||
@@ -84,19 +84,29 @@ struct acpi_driver; | |||
84 | struct acpi_device; | 84 | struct acpi_device; |
85 | 85 | ||
86 | /* | 86 | /* |
87 | * ACPI Scan Handler | ||
88 | * ----------------- | ||
89 | */ | ||
90 | |||
91 | struct acpi_scan_handler { | ||
92 | const struct acpi_device_id *ids; | ||
93 | struct list_head list_node; | ||
94 | int (*attach)(struct acpi_device *dev, const struct acpi_device_id *id); | ||
95 | void (*detach)(struct acpi_device *dev); | ||
96 | }; | ||
97 | |||
98 | /* | ||
87 | * ACPI Driver | 99 | * ACPI Driver |
88 | * ----------- | 100 | * ----------- |
89 | */ | 101 | */ |
90 | 102 | ||
91 | typedef int (*acpi_op_add) (struct acpi_device * device); | 103 | typedef int (*acpi_op_add) (struct acpi_device * device); |
92 | typedef int (*acpi_op_remove) (struct acpi_device * device, int type); | 104 | typedef int (*acpi_op_remove) (struct acpi_device * device); |
93 | typedef int (*acpi_op_start) (struct acpi_device * device); | ||
94 | typedef void (*acpi_op_notify) (struct acpi_device * device, u32 event); | 105 | typedef void (*acpi_op_notify) (struct acpi_device * device, u32 event); |
95 | 106 | ||
96 | struct acpi_device_ops { | 107 | struct acpi_device_ops { |
97 | acpi_op_add add; | 108 | acpi_op_add add; |
98 | acpi_op_remove remove; | 109 | acpi_op_remove remove; |
99 | acpi_op_start start; | ||
100 | acpi_op_notify notify; | 110 | acpi_op_notify notify; |
101 | }; | 111 | }; |
102 | 112 | ||
@@ -271,6 +281,7 @@ struct acpi_device { | |||
271 | struct acpi_device_wakeup wakeup; | 281 | struct acpi_device_wakeup wakeup; |
272 | struct acpi_device_perf performance; | 282 | struct acpi_device_perf performance; |
273 | struct acpi_device_dir dir; | 283 | struct acpi_device_dir dir; |
284 | struct acpi_scan_handler *handler; | ||
274 | struct acpi_driver *driver; | 285 | struct acpi_driver *driver; |
275 | void *driver_data; | 286 | void *driver_data; |
276 | struct device dev; | 287 | struct device dev; |
@@ -384,6 +395,10 @@ int acpi_bus_receive_event(struct acpi_bus_event *event); | |||
384 | static inline int acpi_bus_generate_proc_event(struct acpi_device *device, u8 type, int data) | 395 | static inline int acpi_bus_generate_proc_event(struct acpi_device *device, u8 type, int data) |
385 | { return 0; } | 396 | { return 0; } |
386 | #endif | 397 | #endif |
398 | |||
399 | void acpi_scan_lock_acquire(void); | ||
400 | void acpi_scan_lock_release(void); | ||
401 | int acpi_scan_add_handler(struct acpi_scan_handler *handler); | ||
387 | int acpi_bus_register_driver(struct acpi_driver *driver); | 402 | int acpi_bus_register_driver(struct acpi_driver *driver); |
388 | void acpi_bus_unregister_driver(struct acpi_driver *driver); | 403 | void acpi_bus_unregister_driver(struct acpi_driver *driver); |
389 | int acpi_bus_scan(acpi_handle handle); | 404 | int acpi_bus_scan(acpi_handle handle); |
diff --git a/include/acpi/container.h b/include/acpi/container.h deleted file mode 100644 index a703f14e049e..000000000000 --- a/include/acpi/container.h +++ /dev/null | |||
@@ -1,12 +0,0 @@ | |||
1 | #ifndef __ACPI_CONTAINER_H | ||
2 | #define __ACPI_CONTAINER_H | ||
3 | |||
4 | #include <linux/kernel.h> | ||
5 | |||
6 | struct acpi_container { | ||
7 | acpi_handle handle; | ||
8 | unsigned long sun; | ||
9 | int state; | ||
10 | }; | ||
11 | |||
12 | #endif /* __ACPI_CONTAINER_H */ | ||