]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
ACPI / hotplug: Add .fixup() callback to struct acpi_hotplug_context
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 21 Feb 2014 00:08:51 +0000 (01:08 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 21 Feb 2014 00:08:51 +0000 (01:08 +0100)
In order for the ACPI dock station code to be able to use the
callbacks pointed to by the ACPI device objects' hotplug contexts
add a .fixup() callback pointer to struct acpi_hotplug_context.
That callback will be useful to handle PCI devices located in
dock stations.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/pci/hotplug/acpiphp_glue.c
include/acpi/acpi_bus.h

index db81412cacb0e75dad77ad4f52a63a06bff003b0..4228c67ceffe35fa0dcd80542ad7b7265da229bd 100644 (file)
@@ -80,7 +80,7 @@ static struct acpiphp_context *acpiphp_init_context(struct acpi_device *adev)
                return NULL;
 
        context->refcount = 1;
-       acpi_set_hp_context(adev, &context->hp, acpiphp_hotplug_event);
+       acpi_set_hp_context(adev, &context->hp, acpiphp_hotplug_event, NULL);
        return context;
 }
 
index 8fb297b5307cd58da76908888f72a0eb7c7d5c4e..007fe99e29f51cbdc886f34861c6c3cd13eb4d64 100644 (file)
@@ -144,6 +144,7 @@ struct acpi_scan_handler {
 struct acpi_hotplug_context {
        struct acpi_device *self;
        int (*event)(struct acpi_device *, u32);
+       void (*fixup)(struct acpi_device *);
 };
 
 /*
@@ -366,10 +367,12 @@ 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 (*event)(struct acpi_device *, u32),
+                                      void (*fixup)(struct acpi_device *))
 {
        hp->self = adev;
        hp->event = event;
+       hp->fixup = fixup;
        adev->hp = hp;
 }