Commit 300034f
usb: phy: generic: Convert to devm_clk_get_optional()
The generic USB PHY driver uses the existence of the "clocks" property
to see if a clock is optional or not. Use devm_clk_get_optional()
instead, which exists for this purpose. As usb_phy_generic.clk is now
either a valid clock pointer or NULL, and all clock operations handle
NULL pointers gracefully, several IS_ERR() checks can be removed,
simplifying the code.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
...
Link: https://patch.msgid.link/5cc21d821edf5d40f56a74cd251bb1b982876b72.1769004444.git.geert+renesas@glider.be
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent 62b718d commit 300034f
1 file changed
Lines changed: 9 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
53 | | - | |
| 52 | + | |
54 | 53 | | |
55 | 54 | | |
56 | 55 | | |
57 | 56 | | |
58 | 57 | | |
59 | | - | |
60 | | - | |
| 58 | + | |
61 | 59 | | |
62 | 60 | | |
63 | 61 | | |
| |||
137 | 135 | | |
138 | 136 | | |
139 | 137 | | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
145 | 141 | | |
146 | 142 | | |
147 | 143 | | |
| |||
155 | 151 | | |
156 | 152 | | |
157 | 153 | | |
158 | | - | |
159 | | - | |
| 154 | + | |
160 | 155 | | |
161 | 156 | | |
162 | 157 | | |
| |||
202 | 197 | | |
203 | 198 | | |
204 | 199 | | |
205 | | - | |
206 | 200 | | |
207 | | - | |
208 | 201 | | |
209 | 202 | | |
210 | 203 | | |
211 | 204 | | |
212 | 205 | | |
213 | 206 | | |
214 | | - | |
215 | | - | |
216 | 207 | | |
217 | 208 | | |
218 | 209 | | |
| |||
235 | 226 | | |
236 | 227 | | |
237 | 228 | | |
238 | | - | |
| 229 | + | |
239 | 230 | | |
240 | 231 | | |
241 | 232 | | |
242 | | - | |
243 | | - | |
| 233 | + | |
244 | 234 | | |
245 | 235 | | |
246 | | - | |
| 236 | + | |
247 | 237 | | |
248 | 238 | | |
249 | 239 | | |
| |||
0 commit comments