Commit 4f9ab69
pwm: spear: 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 spear_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-7-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 05c9b6f commit 4f9ab69
1 file changed
Lines changed: 11 additions & 29 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
206 | 206 | | |
207 | 207 | | |
208 | 208 | | |
209 | | - | |
| 209 | + | |
210 | 210 | | |
211 | | - | |
212 | | - | |
213 | | - | |
| 211 | + | |
| 212 | + | |
214 | 213 | | |
215 | 214 | | |
216 | 215 | | |
217 | 216 | | |
218 | 217 | | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | 218 | | |
224 | 219 | | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
229 | 224 | | |
230 | 225 | | |
231 | 226 | | |
| |||
237 | 232 | | |
238 | 233 | | |
239 | 234 | | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
245 | 238 | | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | | - | |
251 | | - | |
252 | | - | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | | - | |
| 239 | + | |
257 | 240 | | |
258 | 241 | | |
259 | 242 | | |
| |||
270 | 253 | | |
271 | 254 | | |
272 | 255 | | |
273 | | - | |
274 | 256 | | |
275 | 257 | | |
276 | 258 | | |
| |||
0 commit comments