Skip to contentSkip to conversation

rtc: rtc-sa1100: Make of_device_id array const

PATCH In review Jingoo Han 2 participants 3 messages Jun 3, 2014 – Jun 6, 2014 Real time clock (RTC)

lore
Share & tools
lore

Jingoo Han

author
#0 lore raw

PATCH 1/2 rtc: rtc-sa1100: Make of_device_id array const

Make of_device_id array const, because all OF functions handle it as const.

---
 drivers/rtc/rtc-sa1100.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/rtc/rtc-sa1100.c +1 -1
index 0f7adeb..b6e1ca0 100644
@@ -338,7 +338,7 @@ static SIMPLE_DEV_PM_OPS(sa1100_rtc_pm_ops, sa1100_rtc_suspend,
 			sa1100_rtc_resume);
 
 #ifdef CONFIG_OF
-static struct of_device_id sa1100_rtc_dt_ids[] = {
+static const struct of_device_id sa1100_rtc_dt_ids[] = {
 	{ .compatible = "mrvl,sa1100-rtc", },
 	{ .compatible = "mrvl,mmp-rtc", },
 	{}
Signature · 1 line
1.7.10.4
author
#1 lore raw

PATCH 2/2 rtc: rtc-pxa: Make of_device_id array const

Make of_device_id array const, because all OF functions handle it as const.

---
 drivers/rtc/rtc-pxa.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/rtc/rtc-pxa.c +1 -1
index cccbf9d..4561f37 100644
@@ -389,7 +389,7 @@ static int __exit pxa_rtc_remove(struct platform_device *pdev)
 }
 
 #ifdef CONFIG_OF
-static struct of_device_id pxa_rtc_dt_ids[] = {
+static const struct of_device_id pxa_rtc_dt_ids[] = {
 	{ .compatible = "marvell,pxa-rtc" },
 	{}
 };
Signature · 1 line
1.7.10.4
Acked-by on v1 1/2
#2 lore raw
In reply to Jingoo Han
Quoted 22 lines · Jingoo Han

Make of_device_id array const, because all OF functions handle it as const.

---
 drivers/rtc/rtc-sa1100.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/rtc/rtc-sa1100.c +1 -2
index 0f7adeb..b6e1ca0 100644
@@ -338,7 +338,7 @@ static SIMPLE_DEV_PM_OPS(sa1100_rtc_pm_ops, sa1100_rtc_suspend,
                        sa1100_rtc_resume);
 
 #ifdef CONFIG_OF
-static struct of_device_id sa1100_rtc_dt_ids[] = {
+static const struct of_device_id sa1100_rtc_dt_ids[] = {
        { .compatible = "mrvl,sa1100-rtc", },
        { .compatible = "mrvl,mmp-rtc", },
        {}
--
Quoted 3 lines

1.7.10.4

Regards
Haojian