diff options
author | Sunil V L <sunilvl@ventanamicro.com> | 2025-08-18 09:39:10 +0530 |
---|---|---|
committer | Paul Walmsley <pjw@kernel.org> | 2025-09-25 15:28:12 -0600 |
commit | e121be784d35e2950652b46258a87381e00270ab (patch) | |
tree | cf9ffb1c06307913dc45a400a5bb36a2f2808510 /drivers/infiniband/hw/ionic/ionic_controlpath.c | |
parent | aa43953e862c031ff66e44353c88beb7a449e80d (diff) |
ACPI: property: Refactor acpi_fwnode_get_reference_args() to support nargs_prop
Currently, acpi_fwnode_get_reference_args() delegates to the internal
function __acpi_node_get_property_reference() to retrieve property
references. However, this function does not handle the nargs_prop (cells
property) parameter, and instead expects the number of arguments (nargs)
to be known or hardcoded.
As a result, when fwnode_property_get_reference_args() is used with a
valid nargs_prop, the ACPI backend ignores it, whereas the Device Tree
(DT) backend uses the #*-cells property from the reference node to
determine the number of arguments dynamically.
To support the nargs_prop in ACPI, refactor the code as follows:
- Move the implementation from __acpi_node_get_property_reference()
into acpi_fwnode_get_reference_args().
- Update __acpi_node_get_property_reference() to call the (now updated)
acpi_fwnode_get_reference_args() passing NULL as nargs_prop to keep
the behavior of __acpi_node_get_property_reference() intact.
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Sunil V L <sunilvl@ventanamicro.com>
Signed-off-by: Anup Patel <apatel@ventanamicro.com>
Acked-by: Jassi Brar <jassisinghbrar@gmail.com>
Link: https://lore.kernel.org/r/20250818040920.272664-15-apatel@ventanamicro.com
Signed-off-by: Paul Walmsley <pjw@kernel.org>
Diffstat (limited to 'drivers/infiniband/hw/ionic/ionic_controlpath.c')
0 files changed, 0 insertions, 0 deletions