]> www.infradead.org Git - users/jedix/linux-maple.git/commit
usb: common: Use helper function for_each_node_with_property()
authorZhang Zekun <zhangzekun11@huawei.com>
Fri, 9 Aug 2024 08:27:11 +0000 (16:27 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 13 Aug 2024 08:37:21 +0000 (10:37 +0200)
commit88177cd4537faf927fe994db99b62d75f73cb1fe
treec05d0d241692d7255d63883abc2f4f04696440f7
parent5cffefa1c1ede3e90a9b09f964bfd5c5e82a1041
usb: common: Use helper function for_each_node_with_property()

for_each_node_with_property() can iterate through the device_node
with a given property name, and we don't need to find the device_node
in the while loop. Since of_device_is_available() will return false if
the "controller" is NULL and break the while loop, there is no functional
change with such conversion.

Signed-off-by: Zhang Zekun <zhangzekun11@huawei.com>
Link: https://lore.kernel.org/r/20240809082711.99085-1-zhangzekun11@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/common/common.c