aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-02-20 19:08:51 -0500
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-02-20 19:08:51 -0500
commit59b42fa01fe2d84f3c3f28ee6f25510820ace35b (patch)
treebe9e3852133481c14fcb830e79aa6802869a6d98
parentd7c7c0256b936901eb7a70fbc6d674a6bdfd463e (diff)
ACPI / hotplug: Add .fixup() callback to struct acpi_hotplug_context
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>
-rw-r--r--drivers/pci/hotplug/acpiphp_glue.c2
-rw-r--r--include/acpi/acpi_bus.h5
2 files changed, 5 insertions, 2 deletions
diff --git a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c
index db81412cacb0..4228c67ceffe 100644
--- a/drivers/pci/hotplug/acpiphp_glue.c
+++ b/drivers/pci/hotplug/acpiphp_glue.c
@@ -80,7 +80,7 @@ static struct acpiphp_context *acpiphp_init_context(struct acpi_device *adev)
80 return NULL; 80 return NULL;
81 81
82 context->refcount = 1; 82 context->refcount = 1;
83 acpi_set_hp_context(adev, &context->hp, acpiphp_hotplug_event); 83 acpi_set_hp_context(adev, &context->hp, acpiphp_hotplug_event, NULL);
84 return context; 84 return context;
85} 85}
86 86
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h
index 8fb297b5307c..007fe99e29f5 100644
--- a/include/acpi/acpi_bus.h
+++ b/include/acpi/acpi_bus.h
@@ -144,6 +144,7 @@ struct acpi_scan_handler {
144struct acpi_hotplug_context { 144struct acpi_hotplug_context {
145 struct acpi_device *self; 145 struct acpi_device *self;
146 int (*event)(struct acpi_device *, u32); 146 int (*event)(struct acpi_device *, u32);
147 void (*fixup)(struct acpi_device *);
147}; 148};
148 149
149/* 150/*
@@ -366,10 +367,12 @@ static inline void acpi_set_device_status(struct acpi_device *adev, u32 sta)
366 367
367static inline void acpi_set_hp_context(struct acpi_device *adev, 368static inline void acpi_set_hp_context(struct acpi_device *adev,
368 struct acpi_hotplug_context *hp, 369 struct acpi_hotplug_context *hp,
369 int (*event)(struct acpi_device *, u32)) 370 int (*event)(struct acpi_device *, u32),
371 void (*fixup)(struct acpi_device *))
370{ 372{
371 hp->self = adev; 373 hp->self = adev;
372 hp->event = event; 374 hp->event = event;
375 hp->fixup = fixup;
373 adev->hp = hp; 376 adev->hp = hp;
374} 377}
375 378