]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
PCI: apple: Use helper function for_each_child_of_node_scoped()
authorZhang Zekun <zhangzekun11@huawei.com>
Sat, 31 Aug 2024 04:04:12 +0000 (12:04 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 6 Jul 2025 08:57:58 +0000 (10:57 +0200)
commit29e2b8088e71331597fb4ee6eeec5f0819b3f0a9
tree91a6c2dce059d2d06ade4c647819e60d4c87419f
parentdb169a93f49a75b3152446bb06576b65c032e4be
PCI: apple: Use helper function for_each_child_of_node_scoped()

[ Upstream commit f60b4e06a945f25d463ae065c6e41c6e24faee0a ]

The for_each_available_child_of_node_scoped() helper provides
a scope-based clean-up functionality to put the device_node
automatically, and as such, there is no need to call of_node_put()
directly.

Thus, use this helper to simplify the code.

Signed-off-by: Zhang Zekun <zhangzekun11@huawei.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Link: https://lore.kernel.org/r/20240831040413.126417-6-zhangzekun11@huawei.com
[kwilczynski: commit log]
Signed-off-by: Krzysztof WilczyƄski <kwilczynski@kernel.org>
Stable-dep-of: 751bec089c4e ("PCI: apple: Set only available ports up")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/pci/controller/pcie-apple.c