ACPI / hotplug / PCI: Simplify acpi_install_hotplug_notify_handler()
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 6 Feb 2014 12:57:58 +0000 (13:57 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 6 Feb 2014 16:31:51 +0000 (17:31 +0100)
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>
drivers/acpi/scan.c
drivers/pci/hotplug/acpiphp_glue.c
include/acpi/acpi_bus.h

index a3f5d6eabe46e9ae499345c2d1c893425ace664f..59f9e272562e60680ab0f900e4ce1c9b6c07ff5c 100644 (file)
@@ -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)
@@ -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;
        }
index 7c498d663eb3b30462fc97cfb543340711c8a5f8..f3c49c442d93e1239eee66eb01a9381b613fc167 100644 (file)
@@ -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;
 }
index 53ce357f6335b90303067f816b40ca93154b384c..907d5078f78a52c934fa45962db2df58ac75b995 100644 (file)
@@ -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);
 
 /**