]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
amba: bus: balance firmware node reference counting
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Fri, 6 Oct 2023 14:57:31 +0000 (17:57 +0300)
committerRob Herring <robh@kernel.org>
Tue, 17 Oct 2023 18:37:35 +0000 (13:37 -0500)
commitca5a75df36dd54fd7ca470a74581ef1d27edaaab
tree4df40de5fbed6a4e8e532c2c5abd7d7e818fa059
parent780967feb626c6f4efa1e4b3532f1be83884cd76
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>
drivers/acpi/arm64/amba.c
drivers/amba/bus.c
drivers/of/platform.c