[PATCH v4 2/8] ACPI: scan: Add function to fetch dependent of acpi device
Daniel Scally
djrscally at gmail.com
Fri May 21 12:25:24 PDT 2021
Hi Rafael
On 20/05/2021 19:55, Rafael J. Wysocki wrote:
> On Thu, May 20, 2021 at 8:33 PM Rafael J. Wysocki <rafael at kernel.org> wrote:
>> On Thu, May 20, 2021 at 4:11 PM Daniel Scally <djrscally at gmail.com> wrote:
>>> In some ACPI tables we encounter, devices use the _DEP method to assert
>>> a dependence on other ACPI devices as opposed to the OpRegions that the
>>> specification intends. We need to be able to find those devices "from"
>>> the dependee, so add a callback and a wrapper to walk over the
>>> acpi_dep_list and return the dependent ACPI device.
>>>
>>> Reviewed-by: Andy Shevchenko <andy.shevchenko at gmail.com>
>>> Signed-off-by: Daniel Scally <djrscally at gmail.com>
>>> ---
>>> Changes since v3:
>>>
>>> Both new functions were renamed.
>>>
>>> drivers/acpi/scan.c | 38 ++++++++++++++++++++++++++++++++++++++
>>> include/acpi/acpi_bus.h | 1 +
>>> 2 files changed, 39 insertions(+)
>>>
>>> diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
>>> index 195635c3462b..1a76fbdfa669 100644
>>> --- a/drivers/acpi/scan.c
>>> +++ b/drivers/acpi/scan.c
>>> @@ -2105,6 +2105,21 @@ static void acpi_bus_attach(struct acpi_device *device, bool first_pass)
>>> device->handler->hotplug.notify_online(device);
>>> }
>>>
>>> +static int acpi_return_dep_dev(struct acpi_dep_data *dep, void *data)
>> What about calling this acpi_get_first_consumer_cb()?
> Or acpi_dev_get_first_consumer_dev_cb() if you want to be super-precise?
Sure; fine by me, and same for the other function
More information about the linux-arm-kernel
mailing list