1
0

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>
Este cometimento está contido em:
Rafael J. Wysocki
2014-07-15 22:03:22 +02:00
ascendente 86f5f3ca49
cometimento ba574dc856
3 ficheiros modificados com 8 adições e 11 eliminações

Ver ficheiro

@@ -372,15 +372,9 @@ 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 (*notify)(struct acpi_device *, u32),
void (*uevent)(struct acpi_device *, u32),
void (*fixup)(struct acpi_device *))
struct acpi_hotplug_context *hp)
{
hp->self = adev;
hp->notify = notify;
hp->uevent = uevent;
hp->fixup = fixup;
adev->hp = hp;
}