Skip to content

Commit

Permalink
ACPI / hotplug / PCI: Simplify acpi_install_hotplug_notify_handler()
Browse files Browse the repository at this point in the history
Since acpi_hotplug_notify_cb() does not use its data argument any
more, the second argument of acpi_install_hotplug_notify_handler()
can be dropped, so do that and update its callers accordingly.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
  • Loading branch information
Rafael J. Wysocki committed Feb 6, 2014
1 parent dd2151b commit 5e6f236
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions drivers/acpi/scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -577,10 +577,10 @@ static void acpi_hotplug_notify_cb(acpi_handle handle, u32 type, void *data)
acpi_evaluate_hotplug_ost(handle, type, ost_code, NULL);
}

void acpi_install_hotplug_notify_handler(acpi_handle handle, void *data)
void acpi_install_hotplug_notify_handler(acpi_handle handle)
{
acpi_install_notify_handler(handle, ACPI_SYSTEM_NOTIFY,
acpi_hotplug_notify_cb, data);
acpi_hotplug_notify_cb, NULL);
}

void acpi_remove_hotplug_notify_handler(acpi_handle handle)
Expand Down Expand Up @@ -2040,7 +2040,7 @@ static void acpi_scan_init_hotplug(struct acpi_device *adev)
if (!handler)
continue;

acpi_install_hotplug_notify_handler(adev->handle, handler);
acpi_install_hotplug_notify_handler(adev->handle);
adev->flags.hotplug_notify = true;
break;
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/pci/hotplug/acpiphp_glue.c
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ static acpi_status register_slot(acpi_handle handle, u32 lvl, void *data,

/* install notify handler */
if (!(newfunc->flags & FUNC_HAS_DCK))
acpi_install_hotplug_notify_handler(handle, NULL);
acpi_install_hotplug_notify_handler(handle);

return AE_OK;
}
Expand Down
2 changes: 1 addition & 1 deletion include/acpi/acpi_bus.h
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ static inline bool acpi_device_enumerated(struct acpi_device *adev)
typedef void (*acpi_hp_callback)(void *data, u32 src);

acpi_status acpi_hotplug_execute(acpi_hp_callback func, void *data, u32 src);
void acpi_install_hotplug_notify_handler(acpi_handle handle, void *data);
void acpi_install_hotplug_notify_handler(acpi_handle handle);
void acpi_remove_hotplug_notify_handler(acpi_handle handle);

/**
Expand Down

0 comments on commit 5e6f236

Please sign in to comment.