diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-03-17 13:47:14 +0100 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-03-17 13:47:14 +0100 |
commit | 6621c5a69a1dac50852ef09d5cf33154a174805a (patch) | |
tree | 88f4ff7d73006abcef64f9793daadda9d5034a32 /include/acpi | |
parent | d983f93328041f85e884a586810a67528ae59945 (diff) | |
parent | d901188f002104905a7845298e1a7dc94189007a (diff) | |
download | lwn-6621c5a69a1dac50852ef09d5cf33154a174805a.tar.gz lwn-6621c5a69a1dac50852ef09d5cf33154a174805a.zip |
Merge branch 'acpi-hotplug'
* acpi-hotplug:
ACPI / hotplug: Rework deferred execution of acpi_device_hotplug()
ACPI / dock: Update copyright notice
ACPI / dock: Drop remove_dock_dependent_devices()
ACPI / dock: Drop struct acpi_dock_ops and all code related to it
ACPI / ATA: Add hotplug contexts to ACPI companions of SATA devices
ACPI / dock: Add .uevent() callback to struct acpi_hotplug_context
ACPI / dock: Use callback pointers from devices' ACPI hotplug contexts
ACPI / dock: Use ACPI device object pointers instead of ACPI handles
ACPI / hotplug: Add .fixup() callback to struct acpi_hotplug_context
ACPI / hotplug / PCI: Do not clear event callback pointer for docks
ACPI / dock: Associate dock platform devices with ACPI device objects
ACPI / dock: Pass ACPI device pointer to acpi_device_is_battery()
ACPI / dock: Dispatch dock notifications from the global notify handler
Diffstat (limited to 'include/acpi')
-rw-r--r-- | include/acpi/acpi_bus.h | 24 | ||||
-rw-r--r-- | include/acpi/acpi_drivers.h | 26 |
2 files changed, 18 insertions, 32 deletions
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h index 32f90c7bcb03..660f5056a37f 100644 --- a/include/acpi/acpi_bus.h +++ b/include/acpi/acpi_bus.h @@ -143,7 +143,9 @@ struct acpi_scan_handler { struct acpi_hotplug_context { struct acpi_device *self; - int (*event)(struct acpi_device *, u32); + int (*notify)(struct acpi_device *, u32); + void (*uevent)(struct acpi_device *, u32); + void (*fixup)(struct acpi_device *); }; /* @@ -201,7 +203,8 @@ struct acpi_device_flags { u32 visited:1; u32 no_hotplug:1; u32 hotplug_notify:1; - u32 reserved:23; + u32 is_dock_station:1; + u32 reserved:22; }; /* File System */ @@ -365,13 +368,22 @@ static inline void acpi_set_device_status(struct acpi_device *adev, u32 sta) static inline void acpi_set_hp_context(struct acpi_device *adev, struct acpi_hotplug_context *hp, - int (*event)(struct acpi_device *, u32)) + int (*notify)(struct acpi_device *, u32), + void (*uevent)(struct acpi_device *, u32), + void (*fixup)(struct acpi_device *)) { hp->self = adev; - hp->event = event; + hp->notify = notify; + hp->uevent = uevent; + hp->fixup = fixup; adev->hp = hp; } +void acpi_initialize_hp_context(struct acpi_device *adev, + struct acpi_hotplug_context *hp, + int (*notify)(struct acpi_device *, u32), + void (*uevent)(struct acpi_device *, u32)); + /* acpi_device.dev.bus == &acpi_bus_type */ extern struct bus_type acpi_bus_type; @@ -443,10 +455,6 @@ static inline bool acpi_device_enumerated(struct acpi_device *adev) return adev && adev->flags.initialized && adev->flags.visited; } -typedef void (*acpi_hp_callback)(void *data, u32 src); - -acpi_status acpi_hotplug_execute(acpi_hp_callback func, void *data, u32 src); - /** * module_acpi_driver(acpi_driver) - Helper macro for registering an ACPI driver * @__acpi_driver: acpi_driver struct diff --git a/include/acpi/acpi_drivers.h b/include/acpi/acpi_drivers.h index b124fdb26046..d504613bbf80 100644 --- a/include/acpi/acpi_drivers.h +++ b/include/acpi/acpi_drivers.h @@ -109,36 +109,14 @@ void pci_acpi_crs_quirks(void); /*-------------------------------------------------------------------------- Dock Station -------------------------------------------------------------------------- */ -struct acpi_dock_ops { - acpi_notify_handler fixup; - acpi_notify_handler handler; - acpi_notify_handler uevent; -}; #ifdef CONFIG_ACPI_DOCK -extern int is_dock_device(acpi_handle handle); -extern int register_hotplug_dock_device(acpi_handle handle, - const struct acpi_dock_ops *ops, - void *context, - void (*init)(void *), - void (*release)(void *)); -extern void unregister_hotplug_dock_device(acpi_handle handle); +extern int is_dock_device(struct acpi_device *adev); #else -static inline int is_dock_device(acpi_handle handle) +static inline int is_dock_device(struct acpi_device *adev) { return 0; } -static inline int register_hotplug_dock_device(acpi_handle handle, - const struct acpi_dock_ops *ops, - void *context, - void (*init)(void *), - void (*release)(void *)) -{ - return -ENODEV; -} -static inline void unregister_hotplug_dock_device(acpi_handle handle) -{ -} #endif /* CONFIG_ACPI_DOCK */ #endif /*__ACPI_DRIVERS_H__*/ |