lkml.org 
[lkml]   [2021]   [Oct]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] ACPI: glue: Use acpi_device_adr() in acpi_find_child_device()
On Wed, Oct 27, 2021 at 06:59:06PM +0200, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>
> Instead of evaluating _ADR in acpi_find_child_device(), use the
> observation that it has already been evaluated and the value returned
> by it has been stored in the pnp.type.bus_address field of the ACPI
> device object at hand.

...

> + acpi_bus_address addr = acpi_device_adr(adev);
> int score;
>
> - status = acpi_evaluate_integer(adev->handle, METHOD_NAME__ADR,
> - NULL, &addr);
> - if (ACPI_FAILURE(status) || addr != address)
> + if (!adev->pnp.type.bus_address || addr != address)
> continue;

I'm not sure I understand the new check, i.e. !adev->pnp.type.bus_address.
IIUC _ADR == 0 is a valid value and children may have it like this.

I believe this change will break the working things (first comes to my mind
is drivers/mfd/intel_quark_i2c_gpio.c).

--
With Best Regards,
Andy Shevchenko


\
 
 \ /
  Last update: 2021-10-27 19:19    [W:0.182 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site