summaryrefslogtreecommitdiff
path: root/drivers/acpi/arm64
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2023-10-06 17:57:31 +0300
committerRob Herring <robh@kernel.org>2023-10-17 13:37:35 -0500
commitca5a75df36dd54fd7ca470a74581ef1d27edaaab (patch)
tree4df40de5fbed6a4e8e532c2c5abd7d7e818fa059 /drivers/acpi/arm64
parent780967feb626c6f4efa1e4b3532f1be83884cd76 (diff)
amba: bus: balance firmware node reference counting
Currently the ACPI code doesn't bump the reference count of the firmware node, while OF counter part does. Not that it's a problem right now, since ACPI doesn't really use the reference counting for firmware nodes, it still makes sense to make code robust against any changes done there. For this, - switch ACPI case to use device_set_node() to be unified with OF - move reference counting to amba_device_add() - switch to use firmware nodes instead of OF ones In the result we will have reference counting done in the same module for all callers independently on the nature of firmware node behind. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20231006145732.3419115-1-andriy.shevchenko@linux.intel.com Signed-off-by: Rob Herring <robh@kernel.org>
Diffstat (limited to 'drivers/acpi/arm64')
-rw-r--r--drivers/acpi/arm64/amba.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/acpi/arm64/amba.c b/drivers/acpi/arm64/amba.c
index 60be8ee1dbdc..171b5c2c7edd 100644
--- a/drivers/acpi/arm64/amba.c
+++ b/drivers/acpi/arm64/amba.c
@@ -101,7 +101,7 @@ static int amba_handler_attach(struct acpi_device *adev,
if (parent)
dev->dev.parent = acpi_get_first_physical_node(parent);
- ACPI_COMPANION_SET(&dev->dev, adev);
+ device_set_node(&dev->dev, acpi_fwnode_handle(adev));
ret = amba_device_add(dev, &iomem_resource);
if (ret) {