aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/scan.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/scan.c')
-rw-r--r--drivers/acpi/scan.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
index 4698060ba3f0..821d154221d5 100644
--- a/drivers/acpi/scan.c
+++ b/drivers/acpi/scan.c
@@ -289,24 +289,17 @@ void acpi_bus_device_eject(void *data, u32 ost_src)
289{ 289{
290 struct acpi_device *device = data; 290 struct acpi_device *device = data;
291 acpi_handle handle = device->handle; 291 acpi_handle handle = device->handle;
292 struct acpi_scan_handler *handler;
293 u32 ost_code = ACPI_OST_SC_NON_SPECIFIC_FAILURE; 292 u32 ost_code = ACPI_OST_SC_NON_SPECIFIC_FAILURE;
294 int error; 293 int error;
295 294
296 lock_device_hotplug(); 295 lock_device_hotplug();
297 mutex_lock(&acpi_scan_lock); 296 mutex_lock(&acpi_scan_lock);
298 297
299 handler = device->handler;
300 if (!handler || !handler->hotplug.enabled) {
301 put_device(&device->dev);
302 goto err_support;
303 }
304
305 if (ost_src == ACPI_NOTIFY_EJECT_REQUEST) 298 if (ost_src == ACPI_NOTIFY_EJECT_REQUEST)
306 acpi_evaluate_hotplug_ost(handle, ACPI_NOTIFY_EJECT_REQUEST, 299 acpi_evaluate_hotplug_ost(handle, ACPI_NOTIFY_EJECT_REQUEST,
307 ACPI_OST_SC_EJECT_IN_PROGRESS, NULL); 300 ACPI_OST_SC_EJECT_IN_PROGRESS, NULL);
308 301
309 if (handler->hotplug.mode == AHM_CONTAINER) 302 if (device->handler && device->handler->hotplug.mode == AHM_CONTAINER)
310 kobject_uevent(&device->dev.kobj, KOBJ_OFFLINE); 303 kobject_uevent(&device->dev.kobj, KOBJ_OFFLINE);
311 304
312 error = acpi_scan_hot_remove(device); 305 error = acpi_scan_hot_remove(device);