Commit a51adf8
PCI: mediatek: Use helper function for_each_available_child_of_node_scoped()
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-4-zhangzekun11@huawei.com
[kwilczynski: commit log]
Signed-off-by: Krzysztof Wilczyński <kwilczynski@kernel.org>1 parent d523347 commit a51adf8
1 file changed
Lines changed: 5 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1041 | 1041 | | |
1042 | 1042 | | |
1043 | 1043 | | |
1044 | | - | |
| 1044 | + | |
1045 | 1045 | | |
1046 | 1046 | | |
1047 | 1047 | | |
1048 | 1048 | | |
1049 | 1049 | | |
1050 | | - | |
| 1050 | + | |
1051 | 1051 | | |
1052 | | - | |
1053 | | - | |
1054 | | - | |
1055 | | - | |
| 1052 | + | |
| 1053 | + | |
1056 | 1054 | | |
1057 | 1055 | | |
1058 | 1056 | | |
1059 | 1057 | | |
1060 | 1058 | | |
1061 | | - | |
| 1059 | + | |
1062 | 1060 | | |
1063 | 1061 | | |
1064 | 1062 | | |
| |||
1079 | 1077 | | |
1080 | 1078 | | |
1081 | 1079 | | |
1082 | | - | |
1083 | | - | |
1084 | | - | |
1085 | 1080 | | |
1086 | 1081 | | |
1087 | 1082 | | |
| |||
0 commit comments