Commit 016b221
i2c: mpc: Use devm_clk_get_optional_enabled() to simplify code
devm_clk_get_optional() and clk_prepare_enable() can be replaced by the
helper function devm_clk_get_optional_enabled(). Let's simplify the code by
using devm_clk_get_optional_enabled() and avoid calling
clk_disable_unprepare().
Signed-off-by: Zhang Zekun <zhangzekun11@huawei.com>
Reviewed-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>1 parent 2259ce0 commit 016b221
1 file changed
Lines changed: 4 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | | - | |
92 | 91 | | |
93 | 92 | | |
94 | 93 | | |
| |||
779 | 778 | | |
780 | 779 | | |
781 | 780 | | |
782 | | - | |
783 | 781 | | |
784 | 782 | | |
785 | 783 | | |
| |||
809 | 807 | | |
810 | 808 | | |
811 | 809 | | |
812 | | - | |
813 | | - | |
814 | | - | |
815 | | - | |
816 | | - | |
817 | | - | |
| 810 | + | |
| 811 | + | |
818 | 812 | | |
819 | | - | |
| 813 | + | |
820 | 814 | | |
821 | 815 | | |
822 | | - | |
823 | | - | |
824 | 816 | | |
825 | 817 | | |
826 | 818 | | |
| |||
876 | 868 | | |
877 | 869 | | |
878 | 870 | | |
879 | | - | |
| 871 | + | |
880 | 872 | | |
881 | 873 | | |
882 | | - | |
883 | | - | |
884 | | - | |
885 | | - | |
886 | | - | |
887 | 874 | | |
888 | 875 | | |
889 | 876 | | |
890 | 877 | | |
891 | 878 | | |
892 | 879 | | |
893 | 880 | | |
894 | | - | |
895 | | - | |
896 | 881 | | |
897 | 882 | | |
898 | 883 | | |
| |||
0 commit comments