Commit c51a697
watchdog: ath79_wdt: Use the devm_clk_get_enabled() helper function
The devm_clk_get_enabled() helper:
- calls devm_clk_get()
- calls clk_prepare_enable() and registers what is needed in order to
call clk_disable_unprepare() when needed, as a managed resource.
This simplifies the code.
Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20230824135514.2661364-3-ruanjinjie@huawei.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>1 parent 3cbb428 commit c51a697
1 file changed
Lines changed: 4 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
257 | 257 | | |
258 | 258 | | |
259 | 259 | | |
260 | | - | |
| 260 | + | |
261 | 261 | | |
262 | 262 | | |
263 | 263 | | |
264 | | - | |
265 | | - | |
266 | | - | |
267 | | - | |
268 | 264 | | |
269 | | - | |
270 | | - | |
271 | | - | |
272 | | - | |
| 265 | + | |
| 266 | + | |
273 | 267 | | |
274 | 268 | | |
275 | 269 | | |
| |||
286 | 280 | | |
287 | 281 | | |
288 | 282 | | |
289 | | - | |
| 283 | + | |
290 | 284 | | |
291 | 285 | | |
292 | 286 | | |
293 | | - | |
294 | | - | |
295 | | - | |
296 | | - | |
297 | 287 | | |
298 | 288 | | |
299 | 289 | | |
300 | 290 | | |
301 | 291 | | |
302 | | - | |
303 | 292 | | |
304 | 293 | | |
305 | 294 | | |
| |||
0 commit comments