Commit d4f5efb
drm/rockchip: lvds: move pclk preparation in with clk_get
The LVDS block needs a separate pclk only on some socs, so currently
requests and prepares it in the soc-specific probe function, but common
code is required to unprepare it in the error path or on driver remove.
While this works because clk_unprepare just does nothing if clk is NULL,
this mismatch of who is responsible still is not very nice.
The clock-framework already has a helper for clk-get-and-prepare even
with devres support in devm_clk_get_prepared().
This will get and prepare the clock and also unprepare it on driver
removal, saving the driver from having to handle it "manually".
Reviewed-by: Quentin Schulz <[email protected]>
Reviewed-by: Andy Yan <[email protected]>
Signed-off-by: Heiko Stuebner <[email protected]>
Signed-off-by: Heiko Stuebner <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]1 parent d05386a commit d4f5efb
1 file changed
+3
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
448 | 448 | | |
449 | 449 | | |
450 | 450 | | |
451 | | - | |
452 | | - | |
453 | 451 | | |
454 | 452 | | |
455 | 453 | | |
456 | 454 | | |
457 | | - | |
| 455 | + | |
458 | 456 | | |
459 | | - | |
| 457 | + | |
460 | 458 | | |
461 | 459 | | |
462 | 460 | | |
| |||
480 | 478 | | |
481 | 479 | | |
482 | 480 | | |
483 | | - | |
484 | | - | |
485 | | - | |
486 | | - | |
487 | | - | |
488 | | - | |
489 | 481 | | |
490 | 482 | | |
491 | 483 | | |
| |||
728 | 720 | | |
729 | 721 | | |
730 | 722 | | |
731 | | - | |
| 723 | + | |
732 | 724 | | |
733 | | - | |
734 | | - | |
735 | 725 | | |
736 | 726 | | |
737 | 727 | | |
738 | 728 | | |
739 | 729 | | |
740 | 730 | | |
741 | | - | |
742 | | - | |
743 | 731 | | |
744 | | - | |
745 | 732 | | |
746 | 733 | | |
747 | 734 | | |
| |||
0 commit comments