clk: samsung: Constify clock init data with clock arrays
authorKrzysztof Kozlowski <k.kozlowski@samsung.com>
Wed, 11 May 2016 12:01:57 +0000 (14:01 +0200)
committerSylwester Nawrocki <s.nawrocki@samsung.com>
Thu, 2 Jun 2016 09:17:59 +0000 (11:17 +0200)
samsung_cmu_register_one() can accept pointer to const initialization
data: struct samsung_cmu_info. The members of the latter can also be
pointers to const data.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
drivers/clk/samsung/clk.c
drivers/clk/samsung/clk.h

index f38a6c49f7449cc1293910ec5c9eacf8df8544aa..e4d14589cc4ac3ba3c3cab84a99c0ff874817cf8 100644 (file)
@@ -381,7 +381,7 @@ static void samsung_clk_sleep_init(void __iomem *reg_base,
  */
 struct samsung_clk_provider * __init samsung_cmu_register_one(
                        struct device_node *np,
-                       struct samsung_cmu_info *cmu)
+                       const struct samsung_cmu_info *cmu)
 {
        void __iomem *reg_base;
        struct samsung_clk_provider *ctx;
index aa872d2c51052a7f81181aabd57b249c55ea0afc..61db98dd01a2e1f7c81c7abdd0689b4d3ea831b5 100644 (file)
@@ -330,28 +330,28 @@ struct samsung_clock_reg_cache {
 
 struct samsung_cmu_info {
        /* list of pll clocks and respective count */
-       struct samsung_pll_clock *pll_clks;
+       const struct samsung_pll_clock *pll_clks;
        unsigned int nr_pll_clks;
        /* list of mux clocks and respective count */
-       struct samsung_mux_clock *mux_clks;
+       const struct samsung_mux_clock *mux_clks;
        unsigned int nr_mux_clks;
        /* list of div clocks and respective count */
-       struct samsung_div_clock *div_clks;
+       const struct samsung_div_clock *div_clks;
        unsigned int nr_div_clks;
        /* list of gate clocks and respective count */
-       struct samsung_gate_clock *gate_clks;
+       const struct samsung_gate_clock *gate_clks;
        unsigned int nr_gate_clks;
        /* list of fixed clocks and respective count */
-       struct samsung_fixed_rate_clock *fixed_clks;
+       const struct samsung_fixed_rate_clock *fixed_clks;
        unsigned int nr_fixed_clks;
        /* list of fixed factor clocks and respective count */
-       struct samsung_fixed_factor_clock *fixed_factor_clks;
+       const struct samsung_fixed_factor_clock *fixed_factor_clks;
        unsigned int nr_fixed_factor_clks;
        /* total number of clocks with IDs assigned*/
        unsigned int nr_clk_ids;
 
        /* list and number of clocks registers */
-       unsigned long *clk_regs;
+       const unsigned long *clk_regs;
        unsigned int nr_clk_regs;
 };
 
@@ -395,7 +395,7 @@ extern void __init samsung_clk_register_pll(struct samsung_clk_provider *ctx,
 
 extern struct samsung_clk_provider __init *samsung_cmu_register_one(
                        struct device_node *,
-                       struct samsung_cmu_info *);
+                       const struct samsung_cmu_info *);
 
 extern unsigned long _get_rate(const char *clk_name);
 
This page took 0.02756 seconds and 5 git commands to generate.