summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/scan.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-11-22 21:55:32 +0100
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-11-22 21:55:32 +0100
commit46394fd017c0615982a3d29d45ced14bea9c526d (patch)
tree403b87b00dfdb0368519ed4c52ae8f0428569310 /drivers/acpi/scan.c
parent3338db0057ed9f554050bd06863731c515d79672 (diff)
ACPI / hotplug: Move container-specific code out of the core
Move container-specific uevents from the core hotplug code to the container scan handler's .attach() and .detach() callbacks. This way the core will not have to special-case containers and the uevents will be guaranteed to happen every time a container is either scanned or trimmed as appropriate. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Tested-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Diffstat (limited to 'drivers/acpi/scan.c')
-rw-r--r--drivers/acpi/scan.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
index 18865c86c463..b1b8f4304597 100644
--- a/drivers/acpi/scan.c
+++ b/drivers/acpi/scan.c
@@ -206,9 +206,6 @@ static int acpi_scan_hot_remove(struct acpi_device *device)
acpi_status status;
unsigned long long sta;
- if (device->handler && device->handler->hotplug.mode == AHM_CONTAINER)
- kobject_uevent(&device->dev.kobj, KOBJ_OFFLINE);
-
/*
* Carry out two passes here and ignore errors in the first pass,
* because if the devices in question are memory blocks and
@@ -288,10 +285,7 @@ static int acpi_scan_device_check(struct acpi_device *adev)
dev_warn(&adev->dev, "Namespace scan failure\n");
return error;
}
- if (adev->handler) {
- if (adev->handler->hotplug.mode == AHM_CONTAINER)
- kobject_uevent(&adev->dev.kobj, KOBJ_ONLINE);
- } else {
+ if (!adev->handler) {
dev_warn(&adev->dev, "Enumeration failure\n");
return -ENODEV;
}