* [PATCH RESEND] clk: samsung: Make of_device_id array const
@ 2014-06-26 12:00 Krzysztof Kozlowski
2014-07-01 1:55 ` Jingoo Han
2014-07-08 13:06 ` Tomasz Figa
0 siblings, 2 replies; 3+ messages in thread
From: Krzysztof Kozlowski @ 2014-06-26 12:00 UTC (permalink / raw)
To: linux-arm-kernel
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>
---
drivers/clk/samsung/clk-exynos4.c | 2 +-
drivers/clk/samsung/clk-exynos5250.c | 2 +-
drivers/clk/samsung/clk-exynos5420.c | 2 +-
drivers/clk/samsung/clk-exynos5440.c | 2 +-
drivers/clk/samsung/clk.c | 2 +-
drivers/clk/samsung/clk.h | 2 +-
6 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/clk/samsung/clk-exynos4.c b/drivers/clk/samsung/clk-exynos4.c
index 4f150c9dd38c..ca6688483390 100644
--- a/drivers/clk/samsung/clk-exynos4.c
+++ b/drivers/clk/samsung/clk-exynos4.c
@@ -1070,7 +1070,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, },
{},
diff --git a/drivers/clk/samsung/clk-exynos5250.c b/drivers/clk/samsung/clk-exynos5250.c
index 1fad4c5e3f5d..0af3e4ff0eb5 100644
--- a/drivers/clk/samsung/clk-exynos5250.c
+++ b/drivers/clk/samsung/clk-exynos5250.c
@@ -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, },
{ },
};
diff --git a/drivers/clk/samsung/clk-exynos5420.c b/drivers/clk/samsung/clk-exynos5420.c
index 9d7d7eed03fd..007b5ef8bc1c 100644
--- a/drivers/clk/samsung/clk-exynos5420.c
+++ b/drivers/clk/samsung/clk-exynos5420.c
@@ -1167,7 +1167,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, },
{ },
};
diff --git a/drivers/clk/samsung/clk-exynos5440.c b/drivers/clk/samsung/clk-exynos5440.c
index 647f1440aa6a..6e8b40a3b143 100644
--- a/drivers/clk/samsung/clk-exynos5440.c
+++ b/drivers/clk/samsung/clk-exynos5440.c
@@ -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, },
{},
};
diff --git a/drivers/clk/samsung/clk.c b/drivers/clk/samsung/clk.c
index 49629c71c9e7..2413677b42fe 100644
--- a/drivers/clk/samsung/clk.c
+++ b/drivers/clk/samsung/clk.c
@@ -284,7 +284,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;
diff --git a/drivers/clk/samsung/clk.h b/drivers/clk/samsung/clk.h
index 9693b80d924f..150a9ebc0266 100644
--- a/drivers/clk/samsung/clk.h
+++ b/drivers/clk/samsung/clk.h
@@ -331,7 +331,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);
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH RESEND] clk: samsung: Make of_device_id array const
2014-06-26 12:00 [PATCH RESEND] clk: samsung: Make of_device_id array const Krzysztof Kozlowski
@ 2014-07-01 1:55 ` Jingoo Han
2014-07-08 13:06 ` Tomasz Figa
1 sibling, 0 replies; 3+ messages in thread
From: Jingoo Han @ 2014-07-01 1:55 UTC (permalink / raw)
To: linux-arm-kernel
On Thursday, June 26, 2014 9:00 PM, Krzysztof Kozlowski wrote:
>
> 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>
Best regards,
Jingoo Han
> ---
> drivers/clk/samsung/clk-exynos4.c | 2 +-
> drivers/clk/samsung/clk-exynos5250.c | 2 +-
> drivers/clk/samsung/clk-exynos5420.c | 2 +-
> drivers/clk/samsung/clk-exynos5440.c | 2 +-
> drivers/clk/samsung/clk.c | 2 +-
> drivers/clk/samsung/clk.h | 2 +-
> 6 files changed, 6 insertions(+), 6 deletions(-)
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH RESEND] clk: samsung: Make of_device_id array const
2014-06-26 12:00 [PATCH RESEND] clk: samsung: Make of_device_id array const Krzysztof Kozlowski
2014-07-01 1:55 ` Jingoo Han
@ 2014-07-08 13:06 ` Tomasz Figa
1 sibling, 0 replies; 3+ messages in thread
From: Tomasz Figa @ 2014-07-08 13:06 UTC (permalink / raw)
To: linux-arm-kernel
Hi Krzysztof,
On 26.06.2014 14:00, Krzysztof Kozlowski wrote:
> 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>
> ---
> drivers/clk/samsung/clk-exynos4.c | 2 +-
> drivers/clk/samsung/clk-exynos5250.c | 2 +-
> drivers/clk/samsung/clk-exynos5420.c | 2 +-
> drivers/clk/samsung/clk-exynos5440.c | 2 +-
> drivers/clk/samsung/clk.c | 2 +-
> drivers/clk/samsung/clk.h | 2 +-
> 6 files changed, 6 insertions(+), 6 deletions(-)
>
Thanks for the patch. Will apply.
Best regards,
Tomasz
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-07-08 13:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-26 12:00 [PATCH RESEND] clk: samsung: Make of_device_id array const Krzysztof Kozlowski
2014-07-01 1:55 ` Jingoo Han
2014-07-08 13:06 ` Tomasz Figa
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).