Skip to content

Commit

Permalink
ACPI / hotplug: Add .fixup() callback to struct acpi_hotplug_context
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Rafael J. Wysocki committed Feb 21, 2014
1 parent d7c7c02 commit 59b42fa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/pci/hotplug/acpiphp_glue.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
5 changes: 4 additions & 1 deletion include/acpi/acpi_bus.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 *);
};

/*
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 59b42fa

Please sign in to comment.