ACPI / scan: Apply default enumeration to devices with ACPI drivers
The current code in acpi_bus_attach() is inconsistent with respect to device objects with ACPI drivers bound to them, as it allows ACPI drivers to bind to device objects with existing "physical" device companions, but it doesn't allow "physical" device objects to be created for ACPI device objects with ACPI drivers bound to them. Thus, in some cases, the outcome depends on the ordering of events which is confusing at best. For this reason, modify acpi_bus_attach() to call acpi_default_enumeration() for device objects with the pnp.type.platform_id flag set regardless of whether or not any ACPI drivers are bound to them. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com> Reviewed-by: Joey Lee <jlee@suse.com>
This commit is contained in:
parent
27d6b97786
commit
f5beabfe61
|
@ -1856,10 +1856,10 @@ static void acpi_bus_attach(struct acpi_device *device)
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (ret > 0 || !device->pnp.type.platform_id)
|
if (device->pnp.type.platform_id)
|
||||||
acpi_device_set_enumerated(device);
|
|
||||||
else
|
|
||||||
acpi_default_enumeration(device);
|
acpi_default_enumeration(device);
|
||||||
|
else
|
||||||
|
acpi_device_set_enumerated(device);
|
||||||
|
|
||||||
ok:
|
ok:
|
||||||
list_for_each_entry(child, &device->children, node)
|
list_for_each_entry(child, &device->children, node)
|
||||||
|
|
Loading…
Reference in New Issue