Commit 1272903
i2c: jz4780: Use devm_clk_get_enabled() helpers
The devm_clk_get_enabled() helpers:
- call devm_clk_get()
- call clk_prepare_enable() and register what is needed in order to
call clk_disable_unprepare() when needed, as a managed resource.
This simplifies the code and avoids the calls to clk_disable_unprepare().
While at it, no more special handling needed here, remove the goto
label "err:".
Signed-off-by: Rong Qianfeng <rongqianfeng@vivo.com>
Acked-by: Paul Cercueil <paul@crapouillou.net>
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>1 parent f1f3dd1 commit 1272903
1 file changed
Lines changed: 7 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
792 | 792 | | |
793 | 793 | | |
794 | 794 | | |
795 | | - | |
| 795 | + | |
796 | 796 | | |
797 | 797 | | |
798 | 798 | | |
799 | | - | |
800 | | - | |
801 | | - | |
802 | | - | |
803 | 799 | | |
804 | 800 | | |
805 | 801 | | |
806 | 802 | | |
807 | | - | |
| 803 | + | |
808 | 804 | | |
809 | 805 | | |
810 | 806 | | |
811 | 807 | | |
812 | 808 | | |
813 | 809 | | |
814 | | - | |
| 810 | + | |
815 | 811 | | |
816 | 812 | | |
817 | 813 | | |
| |||
827 | 823 | | |
828 | 824 | | |
829 | 825 | | |
830 | | - | |
| 826 | + | |
831 | 827 | | |
| 828 | + | |
832 | 829 | | |
833 | 830 | | |
834 | 831 | | |
835 | | - | |
| 832 | + | |
836 | 833 | | |
837 | 834 | | |
838 | 835 | | |
839 | | - | |
| 836 | + | |
840 | 837 | | |
841 | 838 | | |
842 | | - | |
843 | | - | |
844 | | - | |
845 | | - | |
846 | 839 | | |
847 | 840 | | |
848 | 841 | | |
849 | 842 | | |
850 | 843 | | |
851 | 844 | | |
852 | | - | |
853 | 845 | | |
854 | 846 | | |
855 | 847 | | |
| |||
0 commit comments