aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/scan.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-03-02 18:40:38 -0500
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-03-04 19:26:35 -0500
commit1e3bcb596c6b1cf6db93f8f506e2de260e771bad (patch)
tree376eec12f3237da51dcb199f21aacbb06a6afaae /drivers/acpi/scan.c
parent8cc2568124ad599a60024d5b410ba812a0b0917a (diff)
ACPI / hotplug: Rework deferred execution of acpi_device_hotplug()
Since the only function executed by acpi_hotplug_execute() is acpi_device_hotplug() and it only is called by the ACPI core, simplify its definition so that it only takes two arguments, the ACPI device object pointer and event code, rename it to acpi_hotplug_schedule() and move its header from acpi_bus.h to the ACPI core's internal header file internal.h. Modify the definition of acpi_device_hotplug() so that its first argument is an ACPI device object pointer and modify the definition of struct acpi_hp_work accordingly. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: Toshi Kani <toshi.kani@hp.com>
Diffstat (limited to 'drivers/acpi/scan.c')
-rw-r--r--drivers/acpi/scan.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
index f6bcc24f73dc..eb7a1ff224e7 100644
--- a/drivers/acpi/scan.c
+++ b/drivers/acpi/scan.c
@@ -481,10 +481,9 @@ static int acpi_generic_hotplug_event(struct acpi_device *adev, u32 type)
481 return -EINVAL; 481 return -EINVAL;
482} 482}
483 483
484void acpi_device_hotplug(void *data, u32 src) 484void acpi_device_hotplug(struct acpi_device *adev, u32 src)
485{ 485{
486 u32 ost_code = ACPI_OST_SC_NON_SPECIFIC_FAILURE; 486 u32 ost_code = ACPI_OST_SC_NON_SPECIFIC_FAILURE;
487 struct acpi_device *adev = data;
488 int error = -ENODEV; 487 int error = -ENODEV;
489 488
490 lock_device_hotplug(); 489 lock_device_hotplug();
@@ -579,8 +578,7 @@ acpi_eject_store(struct device *d, struct device_attribute *attr,
579 return -ENODEV; 578 return -ENODEV;
580 579
581 get_device(&acpi_device->dev); 580 get_device(&acpi_device->dev);
582 status = acpi_hotplug_execute(acpi_device_hotplug, acpi_device, 581 status = acpi_hotplug_schedule(acpi_device, ACPI_OST_EC_OSPM_EJECT);
583 ACPI_OST_EC_OSPM_EJECT);
584 if (ACPI_SUCCESS(status)) 582 if (ACPI_SUCCESS(status))
585 return count; 583 return count;
586 584