summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Smirnov <andrew.smirnov@gmail.com>2019-07-17 10:56:51 -0400
committerStephen Boyd <sboyd@kernel.org>2019-08-08 00:56:04 -0400
commit570aaec7e9436eae5ffe4588d08e5262731e1b75 (patch)
tree717742a81c827540aa2dc9ba62ef24a5835b1440
parent5f9e832c137075045d15cd6899ab0505cfb2ca4b (diff)
clk: Constify struct clk_bulk_data * where possible
The following functions: - clk_bulk_enable() - clk_bulk_prepare() - clk_bulk_disable() - clk_bulk_unprepare() already expect const clk_bulk_data * as a second parameter, however their no-op version have mismatching prototypes that don't. Fix that. While at it, constify the second argument of clk_bulk_prepare_enable() and clk_bulk_disable_unprepare(), since the functions they are comprised of already accept const clk_bulk_data *. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Cc: Russell King <linux@armlinux.org.uk> Cc: Stephen Boyd <sboyd@kernel.org> Cc: Chris Healy <cphealy@gmail.com> Cc: linux-clk@vger.kernel.org Cc: linux-kernel@vger.kernel.org Link: https://lkml.kernel.org/r/20190717145651.17250-1-andrew.smirnov@gmail.com Signed-off-by: Stephen Boyd <sboyd@kernel.org>
-rw-r--r--include/linux/clk.h17
1 files changed, 10 insertions, 7 deletions
diff --git a/include/linux/clk.h b/include/linux/clk.h
index 3c096c7a51dc..7a795fd6d141 100644
--- a/include/linux/clk.h
+++ b/include/linux/clk.h
@@ -239,7 +239,8 @@ static inline int clk_prepare(struct clk *clk)
239 return 0; 239 return 0;
240} 240}
241 241
242static inline int __must_check clk_bulk_prepare(int num_clks, struct clk_bulk_data *clks) 242static inline int __must_check
243clk_bulk_prepare(int num_clks, const struct clk_bulk_data *clks)
243{ 244{
244 might_sleep(); 245 might_sleep();
245 return 0; 246 return 0;
@@ -263,7 +264,8 @@ static inline void clk_unprepare(struct clk *clk)
263{ 264{
264 might_sleep(); 265 might_sleep();
265} 266}
266static inline void clk_bulk_unprepare(int num_clks, struct clk_bulk_data *clks) 267static inline void clk_bulk_unprepare(int num_clks,
268 const struct clk_bulk_data *clks)
267{ 269{
268 might_sleep(); 270 might_sleep();
269} 271}
@@ -819,7 +821,8 @@ static inline int clk_enable(struct clk *clk)
819 return 0; 821 return 0;
820} 822}
821 823
822static inline int __must_check clk_bulk_enable(int num_clks, struct clk_bulk_data *clks) 824static inline int __must_check clk_bulk_enable(int num_clks,
825 const struct clk_bulk_data *clks)
823{ 826{
824 return 0; 827 return 0;
825} 828}
@@ -828,7 +831,7 @@ static inline void clk_disable(struct clk *clk) {}
828 831
829 832
830static inline void clk_bulk_disable(int num_clks, 833static inline void clk_bulk_disable(int num_clks,
831 struct clk_bulk_data *clks) {} 834 const struct clk_bulk_data *clks) {}
832 835
833static inline unsigned long clk_get_rate(struct clk *clk) 836static inline unsigned long clk_get_rate(struct clk *clk)
834{ 837{
@@ -917,8 +920,8 @@ static inline void clk_disable_unprepare(struct clk *clk)
917 clk_unprepare(clk); 920 clk_unprepare(clk);
918} 921}
919 922
920static inline int __must_check clk_bulk_prepare_enable(int num_clks, 923static inline int __must_check
921 struct clk_bulk_data *clks) 924clk_bulk_prepare_enable(int num_clks, const struct clk_bulk_data *clks)
922{ 925{
923 int ret; 926 int ret;
924 927
@@ -933,7 +936,7 @@ static inline int __must_check clk_bulk_prepare_enable(int num_clks,
933} 936}
934 937
935static inline void clk_bulk_disable_unprepare(int num_clks, 938static inline void clk_bulk_disable_unprepare(int num_clks,
936 struct clk_bulk_data *clks) 939 const struct clk_bulk_data *clks)
937{ 940{
938 clk_bulk_disable(num_clks, clks); 941 clk_bulk_disable(num_clks, clks);
939 clk_bulk_unprepare(num_clks, clks); 942 clk_bulk_unprepare(num_clks, clks);