diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-07-15 16:03:22 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-07-15 19:45:40 -0400 |
commit | ba574dc8563c7c1d1d1c5bf3c1c99ec88513402e (patch) | |
tree | 61f5d7b347d8f05d11bf27bf952a32502c3e0b56 /drivers/pci | |
parent | 86f5f3ca49e3d20c1a5e83917b2c8b98a7c95506 (diff) |
ACPI / hotplug: Simplify acpi_set_hp_context()
Since all of the acpi_set_hp_context() callers pass at least one NULL
function pointer and one caller passes NULL function pointers only
to it, drop function pointer arguments from acpi_set_hp_context()
and make the callers initialize the function pointers in struct
acpi_hotplug_context by themselves before passing it to
acpi_set_hp_context().
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/hotplug/acpiphp_glue.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c index 08043f9c1dd5..24a43d4e9933 100644 --- a/drivers/pci/hotplug/acpiphp_glue.c +++ b/drivers/pci/hotplug/acpiphp_glue.c | |||
@@ -80,8 +80,9 @@ 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_notify, NULL, | 83 | context->hp.notify = acpiphp_hotplug_notify; |
84 | acpiphp_post_dock_fixup); | 84 | context->hp.fixup = acpiphp_post_dock_fixup; |
85 | acpi_set_hp_context(adev, &context->hp); | ||
85 | return context; | 86 | return context; |
86 | } | 87 | } |
87 | 88 | ||
@@ -876,7 +877,7 @@ void acpiphp_enumerate_slots(struct pci_bus *bus) | |||
876 | goto err; | 877 | goto err; |
877 | 878 | ||
878 | root_context->root_bridge = bridge; | 879 | root_context->root_bridge = bridge; |
879 | acpi_set_hp_context(adev, &root_context->hp, NULL, NULL, NULL); | 880 | acpi_set_hp_context(adev, &root_context->hp); |
880 | } else { | 881 | } else { |
881 | struct acpiphp_context *context; | 882 | struct acpiphp_context *context; |
882 | 883 | ||