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.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
index 10985573aaa7..8a46c924effd 100644
--- a/drivers/acpi/scan.c
+++ b/drivers/acpi/scan.c
@@ -352,10 +352,12 @@ static void acpi_scan_bus_device_check(acpi_handle handle, u32 ost_source)
352 mutex_lock(&acpi_scan_lock); 352 mutex_lock(&acpi_scan_lock);
353 lock_device_hotplug(); 353 lock_device_hotplug();
354 354
355 acpi_bus_get_device(handle, &device); 355 if (ost_source != ACPI_NOTIFY_BUS_CHECK) {
356 if (device) { 356 acpi_bus_get_device(handle, &device);
357 dev_warn(&device->dev, "Attempt to re-insert\n"); 357 if (device) {
358 goto out; 358 dev_warn(&device->dev, "Attempt to re-insert\n");
359 goto out;
360 }
359 } 361 }
360 acpi_evaluate_hotplug_ost(handle, ost_source, 362 acpi_evaluate_hotplug_ost(handle, ost_source,
361 ACPI_OST_SC_INSERT_IN_PROGRESS, NULL); 363 ACPI_OST_SC_INSERT_IN_PROGRESS, NULL);
@@ -1981,6 +1983,9 @@ static acpi_status acpi_bus_device_attach(acpi_handle handle, u32 lvl_not_used,
1981 if (acpi_bus_get_device(handle, &device)) 1983 if (acpi_bus_get_device(handle, &device))
1982 return AE_CTRL_DEPTH; 1984 return AE_CTRL_DEPTH;
1983 1985
1986 if (device->handler)
1987 return AE_OK;
1988
1984 ret = acpi_scan_attach_handler(device); 1989 ret = acpi_scan_attach_handler(device);
1985 if (ret) 1990 if (ret)
1986 return ret > 0 ? AE_OK : AE_CTRL_DEPTH; 1991 return ret > 0 ? AE_OK : AE_CTRL_DEPTH;