summaryrefslogtreecommitdiffstats
path: root/drivers/acpi
diff options
context:
space:
mode:
authorRafael J. Wysocki2014-07-15 22:03:22 +0200
committerRafael J. Wysocki2014-07-16 01:45:40 +0200
commitba574dc8563c7c1d1d1c5bf3c1c99ec88513402e (patch)
tree61f5d7b347d8f05d11bf27bf952a32502c3e0b56 /drivers/acpi
parentACPI / hotplug / PCI: Eliminate acpiphp_dev_to_bridge() (diff)
downloadkernel-qcow2-linux-ba574dc8563c7c1d1d1c5bf3c1c99ec88513402e.tar.gz
kernel-qcow2-linux-ba574dc8563c7c1d1d1c5bf3c1c99ec88513402e.tar.xz
kernel-qcow2-linux-ba574dc8563c7c1d1d1c5bf3c1c99ec88513402e.zip
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/acpi')
-rw-r--r--drivers/acpi/scan.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
index f775fa0d850f..3ffc9306538b 100644
--- a/drivers/acpi/scan.c
+++ b/drivers/acpi/scan.c
@@ -77,7 +77,9 @@ void acpi_initialize_hp_context(struct acpi_device *adev,
void (*uevent)(struct acpi_device *, u32))
{
acpi_lock_hp_context();
- acpi_set_hp_context(adev, hp, notify, uevent, NULL);
+ hp->notify = notify;
+ hp->uevent = uevent;
+ acpi_set_hp_context(adev, hp);
acpi_unlock_hp_context();
}
EXPORT_SYMBOL_GPL(acpi_initialize_hp_context);