CSR: add missing sentinels to of_device_id tables
diff mbox

Message ID 1312229376-5982-1-git-send-email-jamie@jamieiles.com
State New, archived
Headers show

Commit Message

Jamie Iles Aug. 1, 2011, 8:09 p.m. UTC
The of_device_id tables used for matching should be terminated with
empty sentinel values.

Cc: Barry Song <baohua.song@csr.com>
Signed-off-by: Jamie Iles <jamie@jamieiles.com>
---
 arch/arm/mach-prima2/clock.c |    1 +
 arch/arm/mach-prima2/irq.c   |    1 +
 arch/arm/mach-prima2/rstc.c  |    1 +
 arch/arm/mach-prima2/timer.c |    1 +
 4 files changed, 4 insertions(+), 0 deletions(-)

Comments

Lothar Waßmann Aug. 2, 2011, 6:42 a.m. UTC | #1
Hi,

Jamie Iles writes:
> The of_device_id tables used for matching should be terminated with
> empty sentinel values.
> 
> Cc: Barry Song <baohua.song@csr.com>
> Signed-off-by: Jamie Iles <jamie@jamieiles.com>
> ---
>  arch/arm/mach-prima2/clock.c |    1 +
>  arch/arm/mach-prima2/irq.c   |    1 +
>  arch/arm/mach-prima2/rstc.c  |    1 +
>  arch/arm/mach-prima2/timer.c |    1 +
>  4 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/mach-prima2/clock.c b/arch/arm/mach-prima2/clock.c
> index f9a2aaf..615a4e7 100644
> --- a/arch/arm/mach-prima2/clock.c
> +++ b/arch/arm/mach-prima2/clock.c
> @@ -481,6 +481,7 @@ static void __init sirfsoc_clk_init(void)
>  
>  static struct of_device_id clkc_ids[] = {
>  	{ .compatible = "sirf,prima2-clkc" },
> +	{},
I would add a comment like '/* end of list sentinel */' inside the
'{}' to make it crystal clear that the empty braces are intentional.
I also would omit the comma since it would be an error adding more
entries after this one.



Lothar Waßmann

Patch
diff mbox

diff --git a/arch/arm/mach-prima2/clock.c b/arch/arm/mach-prima2/clock.c
index f9a2aaf..615a4e7 100644
--- a/arch/arm/mach-prima2/clock.c
+++ b/arch/arm/mach-prima2/clock.c
@@ -481,6 +481,7 @@  static void __init sirfsoc_clk_init(void)
 
 static struct of_device_id clkc_ids[] = {
 	{ .compatible = "sirf,prima2-clkc" },
+	{},
 };
 
 void __init sirfsoc_of_clk_init(void)
diff --git a/arch/arm/mach-prima2/irq.c b/arch/arm/mach-prima2/irq.c
index c3404cb..7af254d 100644
--- a/arch/arm/mach-prima2/irq.c
+++ b/arch/arm/mach-prima2/irq.c
@@ -51,6 +51,7 @@  static __init void sirfsoc_irq_init(void)
 
 static struct of_device_id intc_ids[]  = {
 	{ .compatible = "sirf,prima2-intc" },
+	{},
 };
 
 void __init sirfsoc_of_irq_init(void)
diff --git a/arch/arm/mach-prima2/rstc.c b/arch/arm/mach-prima2/rstc.c
index d074786..492cfa8 100644
--- a/arch/arm/mach-prima2/rstc.c
+++ b/arch/arm/mach-prima2/rstc.c
@@ -19,6 +19,7 @@  static DEFINE_MUTEX(rstc_lock);
 
 static struct of_device_id rstc_ids[]  = {
 	{ .compatible = "sirf,prima2-rstc" },
+	{},
 };
 
 static int __init sirfsoc_of_rstc_init(void)
diff --git a/arch/arm/mach-prima2/timer.c b/arch/arm/mach-prima2/timer.c
index 44027f3..ed7ec48 100644
--- a/arch/arm/mach-prima2/timer.c
+++ b/arch/arm/mach-prima2/timer.c
@@ -190,6 +190,7 @@  static void __init sirfsoc_timer_init(void)
 
 static struct of_device_id timer_ids[] = {
 	{ .compatible = "sirf,prima2-tick" },
+	{},
 };
 
 static void __init sirfsoc_of_timer_map(void)