提交 f406270b 编写于 作者: R Rafael J. Wysocki

ACPI / scan: Set the visited flag for all enumerated devices

Commit 10c7e20b (ACPI / scan: fix enumeration (visited) flags for
bus rescans) attempted to fix a problem with ACPI-based enumerateion
of I2C/SPI devices, but it forgot to ensure that the visited flag
will be set for all of the other enumerated devices, so fix that.

Fixes: 10c7e20b (ACPI / scan: fix enumeration (visited) flags for bus rescans)
Link: https://bugzilla.kernel.org/show_bug.cgi?id=194885Reported-and-tested-by: NKevin Locke <kevin@kevinlocke.name>
Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: NMika Westerberg <mika.westerberg@linux.intel.com>
Cc: 4.8+ <stable@vger.kernel.org> # 4.8+
上级 39da7c50
...@@ -1857,15 +1857,20 @@ static void acpi_bus_attach(struct acpi_device *device) ...@@ -1857,15 +1857,20 @@ static void acpi_bus_attach(struct acpi_device *device)
return; return;
device->flags.match_driver = true; device->flags.match_driver = true;
if (!ret) { if (ret > 0) {
ret = device_attach(&device->dev); acpi_device_set_enumerated(device);
if (ret < 0) goto ok;
return;
if (!ret && device->pnp.type.platform_id)
acpi_default_enumeration(device);
} }
ret = device_attach(&device->dev);
if (ret < 0)
return;
if (ret > 0 || !device->pnp.type.platform_id)
acpi_device_set_enumerated(device);
else
acpi_default_enumeration(device);
ok: ok:
list_for_each_entry(child, &device->children, node) list_for_each_entry(child, &device->children, node)
acpi_bus_attach(child); acpi_bus_attach(child);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册