On Sun, Mar 28, 2021 at 1:20 PM Hans de Goede <hdegoede@xxxxxxxxxx> wrote: > > Move acpi_scan_dep_init() higher up in scan.c to avoid needing a forward > declaration in the next patch in this set. > > Fixes: 71da201f38df ("ACPI: scan: Defer enumeration of devices with _DEP lists") Well, this doesn't seem applicable here, as the patch shouldn't make a practical difference. > Signed-off-by: Hans de Goede <hdegoede@xxxxxxxxxx> > --- > drivers/acpi/scan.c | 28 ++++++++++++++-------------- > 1 file changed, 14 insertions(+), 14 deletions(-) > > diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c > index 1584c9e463bd..19f8fd6ea17a 100644 > --- a/drivers/acpi/scan.c > +++ b/drivers/acpi/scan.c > @@ -1655,6 +1655,20 @@ void acpi_device_add_finalize(struct acpi_device *device) > kobject_uevent(&device->dev.kobj, KOBJ_ADD); > } > > +static void acpi_scan_dep_init(struct acpi_device *adev) > +{ > + struct acpi_dep_data *dep; > + > + mutex_lock(&acpi_dep_list_lock); > + > + list_for_each_entry(dep, &acpi_dep_list, node) { > + if (dep->consumer == adev->handle) > + adev->dep_unmet++; > + } > + > + mutex_unlock(&acpi_dep_list_lock); > +} > + > static int acpi_add_single_object(struct acpi_device **child, > acpi_handle handle, int type, > unsigned long long sta) > @@ -1906,20 +1920,6 @@ static u32 acpi_scan_check_dep(acpi_handle handle) > return count; > } > > -static void acpi_scan_dep_init(struct acpi_device *adev) > -{ > - struct acpi_dep_data *dep; > - > - mutex_lock(&acpi_dep_list_lock); > - > - list_for_each_entry(dep, &acpi_dep_list, node) { > - if (dep->consumer == adev->handle) > - adev->dep_unmet++; > - } > - > - mutex_unlock(&acpi_dep_list_lock); > -} > - > static bool acpi_bus_scan_second_pass; > > static acpi_status acpi_bus_check_add(acpi_handle handle, bool check_dep, > -- > 2.30.2 >