mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
ACPI: scan: Combine two conditionals in acpi_bus_attach()
There are two conditionals in acpi_bus_attach() that can be combined, which slightly reduces the overhead and makes the code a bit easier to follow, so do that. No intentional functional impact. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Peixin Xie <peixin.xie@linux.spacemit.com> Tested-by: Sakari Ailus <sakari.ailus@linux.intel.com> Link: https://patch.msgid.link/8746939.T7Z3S40VBb@rafael.j.wysocki Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
parent
811268084e
commit
dc2447880b
|
|
@ -2386,13 +2386,8 @@ static int acpi_bus_attach(struct acpi_device *device, void *first_pass)
|
|||
if (ret < 0)
|
||||
return 0;
|
||||
|
||||
if (ret > 0 && !device->flags.enumeration_by_parent) {
|
||||
acpi_device_set_enumerated(device);
|
||||
goto ok;
|
||||
}
|
||||
|
||||
if (device->pnp.type.platform_id || device->pnp.type.backlight ||
|
||||
device->flags.enumeration_by_parent)
|
||||
if (device->flags.enumeration_by_parent ||
|
||||
(!ret && (device->pnp.type.platform_id || device->pnp.type.backlight)))
|
||||
acpi_default_enumeration(device);
|
||||
else
|
||||
acpi_device_set_enumerated(device);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user