Commit ad4d451e authored by Rafael J. Wysocki's avatar Rafael J. Wysocki

ACPI: scan: Rearrange acpi_dev_get_first_consumer_dev_cb()

Make acpi_dev_get_first_consumer_dev_cb() a bit more straightforward
and rewrite the comment in it.

No functional impact.
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
parent 2d079514
...@@ -2101,13 +2101,12 @@ static int acpi_dev_get_first_consumer_dev_cb(struct acpi_dep_data *dep, void *d ...@@ -2101,13 +2101,12 @@ static int acpi_dev_get_first_consumer_dev_cb(struct acpi_dep_data *dep, void *d
struct acpi_device *adev; struct acpi_device *adev;
adev = acpi_bus_get_acpi_device(dep->consumer); adev = acpi_bus_get_acpi_device(dep->consumer);
if (!adev) if (adev) {
/* If we don't find an adev then we want to continue parsing */ *(struct acpi_device **)data = adev;
return 0; return 1;
}
*(struct acpi_device **)data = adev; /* Continue parsing if the device object is not present. */
return 0;
return 1;
} }
static int acpi_scan_clear_dep(struct acpi_dep_data *dep, void *data) static int acpi_scan_clear_dep(struct acpi_dep_data *dep, void *data)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment