Skip to contentSkip to conversation

regulator: anatop: Make of_device_id array const

PATCH Applied Jingoo Han 4 participants 8 messages May 7, 2014

Subsystems (3)
lore
Share & tools
lore

Jingoo Han

author
#0 lore raw

PATCH 1/5 regulator: anatop: Make of_device_id array const

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

---
 drivers/regulator/anatop-regulator.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/regulator/anatop-regulator.c +1 -1
index 7c397bb..4f730af 100644
@@ -300,7 +300,7 @@ static int anatop_regulator_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static struct of_device_id of_anatop_regulator_match_tbl[] = {
+static const struct of_device_id of_anatop_regulator_match_tbl[] = {
 	{ .compatible = "fsl,anatop-regulator", },
 	{ /* end */ }
 };
Signature · 1 line
1.7.10.4
author
#1 lore raw

PATCH 2/5 regulator: max8952: Make of_device_id array const

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

---
 drivers/regulator/max8952.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/regulator/max8952.c +1 -1
index d920f5a..c2792f0 100644
@@ -129,7 +129,7 @@ static const struct regulator_desc regulator = {
 };
 
 #ifdef CONFIG_OF
-static struct of_device_id max8952_dt_match[] = {
+static const struct of_device_id max8952_dt_match[] = {
 	{ .compatible = "maxim,max8952" },
 	{},
 };
Signature · 1 line
1.7.10.4
Reviewed-by on v1 2/5
#2 lore raw

Re: [PATCH 2/5] regulator: max8952: Make of_device_id array const

Quoted 7 lines · Jingoo Han

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

---
 drivers/regulator/max8952.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Best regards,
Krzysztof

Quoted 14 lines
drivers/regulator/max8952.c +1 -1
index d920f5a..c2792f0 100644
@@ -129,7 +129,7 @@ static const struct regulator_desc regulator = {
 };
 
 #ifdef CONFIG_OF
-static struct of_device_id max8952_dt_match[] = {
+static const struct of_device_id max8952_dt_match[] = {
 	{ .compatible = "maxim,max8952" },
 	{},
 };
author
#3 lore raw

PATCH 3/5 regulator: palmas: Make of_device_id array const

In reply to Jingoo Han

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

---
 drivers/regulator/palmas-regulator.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/regulator/palmas-regulator.c +1 -1
index 9c62b1d..671cb9f 100644
@@ -1199,7 +1199,7 @@ static int palmas_regulators_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static struct of_device_id of_palmas_match_tbl[] = {
+static const struct of_device_id of_palmas_match_tbl[] = {
 	{ .compatible = "ti,palmas-pmic", },
 	{ .compatible = "ti,twl6035-pmic", },
 	{ .compatible = "ti,twl6036-pmic", },
Signature · 1 line
1.7.10.4
author
#4 lore raw

PATCH 4/5 regulator: st-pwm: Make of_device_id array const

In reply to Jingoo Han

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

---
 drivers/regulator/st-pwm.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/regulator/st-pwm.c +1 -1
index e367af1..5ea78df 100644
@@ -118,7 +118,7 @@ static const struct st_pwm_regulator_pdata b2105_info = {
 	.duty_cycle_table = b2105_duty_cycle_table,
 };
 
-static struct of_device_id st_pwm_of_match[] = {
+static const struct of_device_id st_pwm_of_match[] = {
 	{ .compatible = "st,b2105-pwm-regulator", .data = &b2105_info, },
 	{ },
 };
Signature · 1 line
1.7.10.4
author
#5 lore raw

PATCH 5/5 regulator: vexpress: Make of_device_id array const

In reply to Jingoo Han

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

---
 drivers/regulator/vexpress.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/regulator/vexpress.c +1 -1
index f3ae28a..147ecc7 100644
@@ -123,7 +123,7 @@ static int vexpress_regulator_remove(struct platform_device *pdev)
 	return 0;
 }
 
-static struct of_device_id vexpress_regulator_of_match[] = {
+static const struct of_device_id vexpress_regulator_of_match[] = {
 	{ .compatible = "arm,vexpress-volt", },
 	{ }
 };
Signature · 1 line
1.7.10.4
Acked-by on v1 5/5
#6 lore raw

Re: [PATCH 5/5] regulator: vexpress: Make of_device_id array const

Quoted 13 lines · Jingoo Han

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

---
 drivers/regulator/vexpress.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/regulator/vexpress.c +0 -0
index f3ae28a..147ecc7 100644

drivers/regulator/vexpress.c static int vexpress_regulator_remove(struct platform_device *pdev) · line 129

Quoted 8 lines
drivers/regulator/vexpress.c +1 -1
@@ -123,7 +123,7 @@ static int vexpress_regulator_remove(struct platform_device *pdev)
 	return 0;
 }
 
-static struct of_device_id vexpress_regulator_of_match[] = {
+static const struct of_device_id vexpress_regulator_of_match[] = {
 	{ .compatible = "arm,vexpress-volt", },
 	{ }
 };

Thanks!

Pawel

maintainer Applied
#7 lore raw
In reply to Jingoo Han
Quoted 2 lines · Jingoo Han

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

Applied all, thanks.