Commit 5af615f
pwm: brcmstb: Simplify using devm functions
With devm_clk_get_enabled() the call to clk_disable_unprepare() can be
dropped from the error path and the remove callback. With
devm_pwmchip_add() pwmchip_remove() can be dropped. Then the remove
callback is empty and can go away, too.
Also use dev_err_probe() for simplified (and improved) error reporting.
Link: https://lore.kernel.org/r/20230929161918.2410424-4-u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>1 parent 2ce7b7f commit 5af615f
1 file changed
Lines changed: 9 additions & 33 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
237 | 237 | | |
238 | 238 | | |
239 | 239 | | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | | - | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
251 | 244 | | |
252 | 245 | | |
253 | 246 | | |
| |||
256 | 249 | | |
257 | 250 | | |
258 | 251 | | |
259 | | - | |
260 | | - | |
261 | | - | |
262 | | - | |
| 252 | + | |
| 253 | + | |
263 | 254 | | |
264 | | - | |
265 | | - | |
266 | | - | |
267 | | - | |
268 | | - | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
269 | 258 | | |
270 | 259 | | |
271 | | - | |
272 | | - | |
273 | | - | |
274 | | - | |
275 | | - | |
276 | | - | |
277 | | - | |
278 | | - | |
279 | | - | |
280 | | - | |
281 | | - | |
282 | | - | |
283 | 260 | | |
284 | 261 | | |
285 | 262 | | |
| |||
307 | 284 | | |
308 | 285 | | |
309 | 286 | | |
310 | | - | |
311 | 287 | | |
312 | 288 | | |
313 | 289 | | |
| |||
0 commit comments