Commit 3cbb428
watchdog: at91sam9_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: Claudiu Beznea <claudiu.beznea@tuxon.dev>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20230824135514.2661364-2-ruanjinjie@huawei.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>1 parent ce9ecca commit 3cbb428
1 file changed
Lines changed: 5 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
348 | 348 | | |
349 | 349 | | |
350 | 350 | | |
351 | | - | |
352 | | - | |
353 | | - | |
354 | | - | |
355 | | - | |
356 | | - | |
| 351 | + | |
| 352 | + | |
357 | 353 | | |
358 | | - | |
| 354 | + | |
359 | 355 | | |
360 | 356 | | |
361 | 357 | | |
362 | 358 | | |
363 | 359 | | |
364 | | - | |
| 360 | + | |
365 | 361 | | |
366 | 362 | | |
367 | 363 | | |
368 | 364 | | |
369 | | - | |
| 365 | + | |
370 | 366 | | |
371 | 367 | | |
372 | 368 | | |
373 | 369 | | |
374 | 370 | | |
375 | 371 | | |
376 | 372 | | |
377 | | - | |
378 | | - | |
379 | | - | |
380 | | - | |
381 | | - | |
382 | 373 | | |
383 | 374 | | |
384 | 375 | | |
| |||
388 | 379 | | |
389 | 380 | | |
390 | 381 | | |
391 | | - | |
392 | 382 | | |
393 | 383 | | |
394 | 384 | | |
| |||
0 commit comments