]> git.ipfire.org Git - thirdparty/linux.git/commit
net: gianfar: Use device_get_named_child_node_count()
authorMatti Vaittinen <mazziesaccount@gmail.com>
Wed, 18 Jun 2025 12:22:02 +0000 (15:22 +0300)
committerJakub Kicinski <kuba@kernel.org>
Thu, 19 Jun 2025 22:36:21 +0000 (15:36 -0700)
commit64f37cd57d7a32e3a768870d12bec81bec426419
treec8b5605f2e1b50a904805216288f193f642a6c1b
parent39983de5d43f9851982293f7c2731ccaf6c46e9b
net: gianfar: Use device_get_named_child_node_count()

We can avoid open-coding the loop construct which counts firmware child
nodes with a specific name by using the newly added
device_get_named_child_node_count().

The gianfar driver has such open-coded loop. Replace it with the
device_get_child_node_count_named().

Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/3a33988fc042588cb00a0bfc5ad64e749cb0eb1f.1750248902.git.mazziesaccount@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/freescale/gianfar.c