aboutsummaryrefslogtreecommitdiffstats
path: root/include/acpi
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-02-15 07:58:30 -0500
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-02-15 07:58:30 -0500
commite8f71df723339b6d3861886f58c245812d1994f8 (patch)
tree77264d37afeff152816afa1fea7b960dc8cbbd1e /include/acpi
parentb34bf8e3cd5039ccba7f478601188427b1a8cd0b (diff)
parent3757b94802fb65d8f696597a74053cf21738da0b (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.h21
-rw-r--r--include/acpi/container.h12
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;
84struct acpi_device; 84struct acpi_device;
85 85
86/* 86/*
87 * ACPI Scan Handler
88 * -----------------
89 */
90
91struct 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
91typedef int (*acpi_op_add) (struct acpi_device * device); 103typedef int (*acpi_op_add) (struct acpi_device * device);
92typedef int (*acpi_op_remove) (struct acpi_device * device, int type); 104typedef int (*acpi_op_remove) (struct acpi_device * device);
93typedef int (*acpi_op_start) (struct acpi_device * device);
94typedef void (*acpi_op_notify) (struct acpi_device * device, u32 event); 105typedef void (*acpi_op_notify) (struct acpi_device * device, u32 event);
95 106
96struct acpi_device_ops { 107struct 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);
384static inline int acpi_bus_generate_proc_event(struct acpi_device *device, u8 type, int data) 395static 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
399void acpi_scan_lock_acquire(void);
400void acpi_scan_lock_release(void);
401int acpi_scan_add_handler(struct acpi_scan_handler *handler);
387int acpi_bus_register_driver(struct acpi_driver *driver); 402int acpi_bus_register_driver(struct acpi_driver *driver);
388void acpi_bus_unregister_driver(struct acpi_driver *driver); 403void acpi_bus_unregister_driver(struct acpi_driver *driver);
389int acpi_bus_scan(acpi_handle handle); 404int 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
6struct acpi_container {
7 acpi_handle handle;
8 unsigned long sun;
9 int state;
10};
11
12#endif /* __ACPI_CONTAINER_H */