]> Pileus Git - ~andy/linux/blobdiff - drivers/acpi/scan.c
sh_eth: get register layout from 'struct sh_eth_cpu_data'
[~andy/linux] / drivers / acpi / scan.c
index 10985573aaa7c680613c1412c958d81d7af22f64..8a46c924effd4e5bef09cb645429170e70ed380a 100644 (file)
@@ -352,10 +352,12 @@ static void acpi_scan_bus_device_check(acpi_handle handle, u32 ost_source)
        mutex_lock(&acpi_scan_lock);
        lock_device_hotplug();
 
-       acpi_bus_get_device(handle, &device);
-       if (device) {
-               dev_warn(&device->dev, "Attempt to re-insert\n");
-               goto out;
+       if (ost_source != ACPI_NOTIFY_BUS_CHECK) {
+               acpi_bus_get_device(handle, &device);
+               if (device) {
+                       dev_warn(&device->dev, "Attempt to re-insert\n");
+                       goto out;
+               }
        }
        acpi_evaluate_hotplug_ost(handle, ost_source,
                                  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,
        if (acpi_bus_get_device(handle, &device))
                return AE_CTRL_DEPTH;
 
+       if (device->handler)
+               return AE_OK;
+
        ret = acpi_scan_attach_handler(device);
        if (ret)
                return ret > 0 ? AE_OK : AE_CTRL_DEPTH;