clk: samsung: Make of_device_id array const
authorKrzysztof Kozlowski <k.kozlowski@samsung.com>
Thu, 26 Jun 2014 12:00:06 +0000 (14:00 +0200)
committerTomasz Figa <t.figa@samsung.com>
Sat, 26 Jul 2014 00:49:58 +0000 (02:49 +0200)
Array of struct of_device_id may be be const as expected by
of_match_table field and of_find_matching_node_and_match() function.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Reviewed-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Tomasz Figa <t.figa@samsung.com>
drivers/clk/samsung/clk-exynos4.c
drivers/clk/samsung/clk-exynos5250.c
drivers/clk/samsung/clk-exynos5420.c
drivers/clk/samsung/clk-exynos5440.c
drivers/clk/samsung/clk.c
drivers/clk/samsung/clk.h

index 1563ea83f5e8e3e255990f8fe8125733b488b433..ac163d7f5bc35e89f5b37c7525833dfdcdbf72a6 100644 (file)
@@ -1254,7 +1254,7 @@ static void __init exynos4_clk_register_finpll(struct samsung_clk_provider *ctx)
 
 }
 
-static struct of_device_id ext_clk_match[] __initdata = {
+static const struct of_device_id ext_clk_match[] __initconst = {
        { .compatible = "samsung,clock-xxti", .data = (void *)0, },
        { .compatible = "samsung,clock-xusbxti", .data = (void *)1, },
        {},
index 5861183d12267b9e7bca8a87cd3f5d31231d4dad..70ec3d2608a17e2f282e65dc198cd6af9c3fbbb9 100644 (file)
@@ -748,7 +748,7 @@ static struct samsung_pll_clock exynos5250_plls[nr_plls] __initdata = {
                VPLL_LOCK, VPLL_CON0, NULL),
 };
 
-static struct of_device_id ext_clk_match[] __initdata = {
+static const struct of_device_id ext_clk_match[] __initconst = {
        { .compatible = "samsung,clock-xxti", .data = (void *)0, },
        { },
 };
index 94e43608bc86a4c8888ebc8889adfd63dd8f47f6..a2e765cf9811d06cf9134c2af7003bbdc171529e 100644 (file)
@@ -1192,7 +1192,7 @@ static struct samsung_pll_clock exynos5x_plls[nr_plls] __initdata = {
                KPLL_CON0, NULL),
 };
 
-static struct of_device_id ext_clk_match[] __initdata = {
+static const struct of_device_id ext_clk_match[] __initconst = {
        { .compatible = "samsung,exynos5420-oscclk", .data = (void *)0, },
        { },
 };
index 2f182f2399ba59b755b9209e06ee28245c679190..00d1d00a41de5b99e0b92d65717c21507c1cf063 100644 (file)
@@ -84,7 +84,7 @@ static struct samsung_gate_clock exynos5440_gate_clks[] __initdata = {
        GATE(CLK_CS250_O, "cs250_o", "cs250", CLKEN_OV_VAL, 19, 0, 0),
 };
 
-static struct of_device_id ext_clk_match[] __initdata = {
+static const struct of_device_id ext_clk_match[] __initconst = {
        { .compatible = "samsung,clock-xtal", .data = (void *)0, },
        {},
 };
index 98fb31bf569844f33e8800d82453d86b91d0f180..deab84d9f37deec161070fc372f6756a90369a43 100644 (file)
@@ -285,7 +285,7 @@ void __init samsung_clk_register_gate(struct samsung_clk_provider *ctx,
 void __init samsung_clk_of_register_fixed_ext(struct samsung_clk_provider *ctx,
                        struct samsung_fixed_rate_clock *fixed_rate_clk,
                        unsigned int nr_fixed_rate_clk,
-                       struct of_device_id *clk_matches)
+                       const struct of_device_id *clk_matches)
 {
        const struct of_device_id *match;
        struct device_node *clk_np;
index 92131f972917e5205e9da116fce20eed8777be88..66ab36b5cef1018de647434cc0848f549b546ab2 100644 (file)
@@ -333,7 +333,7 @@ extern void __init samsung_clk_of_register_fixed_ext(
                        struct samsung_clk_provider *ctx,
                        struct samsung_fixed_rate_clock *fixed_rate_clk,
                        unsigned int nr_fixed_rate_clk,
-                       struct of_device_id *clk_matches);
+                       const struct of_device_id *clk_matches);
 
 extern void samsung_clk_add_lookup(struct samsung_clk_provider *ctx,
                        struct clk *clk, unsigned int id);