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:
@@ -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;
|
||||
}
|
||||
|
||||
|
Criar uma nova questão referindo esta
Bloquear um utilizador