Commit dfbf937
pwm: vt8500: Simplify using devm functions
With devm_clk_get_prepared() the call to clk_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. With vt8500_pwm_remove() the last user of
platform_get_drvdata() is gone and so platform_set_drvdata() can be
dropped, too.
Also use dev_err_probe() for simplified (and improved) error reporting.
Link: https://lore.kernel.org/r/20230929161918.2410424-10-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 21c0e1a commit dfbf937
1 file changed
Lines changed: 9 additions & 33 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
235 | 235 | | |
236 | 236 | | |
237 | 237 | | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
| 238 | + | |
| 239 | + | |
242 | 240 | | |
243 | 241 | | |
244 | 242 | | |
| |||
248 | 246 | | |
249 | 247 | | |
250 | 248 | | |
251 | | - | |
252 | | - | |
253 | | - | |
254 | | - | |
255 | | - | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
256 | 252 | | |
257 | 253 | | |
258 | 254 | | |
259 | 255 | | |
260 | 256 | | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | | - | |
265 | | - | |
266 | | - | |
267 | | - | |
268 | | - | |
269 | | - | |
270 | | - | |
271 | | - | |
272 | | - | |
273 | | - | |
274 | | - | |
275 | | - | |
276 | | - | |
277 | | - | |
278 | | - | |
279 | | - | |
280 | | - | |
281 | | - | |
282 | | - | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
283 | 260 | | |
284 | | - | |
| 261 | + | |
285 | 262 | | |
286 | 263 | | |
287 | 264 | | |
288 | 265 | | |
289 | | - | |
290 | 266 | | |
291 | 267 | | |
292 | 268 | | |
| |||
0 commit comments