ACPI / dock: Add .uevent() callback to struct acpi_hotplug_context

In order to avoid the need to register special ACPI dock
operations for SATA devices add a .uevent() callback pointer to
struct acpi_hotplug_context and make dock_hotplug_event() use that
callback if available.  Also rename the existing .event() callback
in struct acpi_hotplug_context to .notify() to avoid possible
confusion in the future.

Signed-off-by: Rafael J. Wysocki <[email protected]>
This commit is contained in:
Rafael J. Wysocki 2014-02-21 01:10:27 +01:00
commit be27b3dcb0
4 changed files with 24 additions and 12 deletions

View file

@ -143,7 +143,8 @@ 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 *);
};
@ -367,11 +368,13 @@ 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;
}