* [PATCH 2/4] regulator: max77693: Make regulator_desc array const
2014-10-27 15:44 [PATCH 1/4] regulator: dummy: Make regulator_desc array const Krzysztof Kozlowski
@ 2014-10-27 15:44 ` Krzysztof Kozlowski
2014-10-27 15:44 ` [PATCH 3/4] regulator: max77802: " Krzysztof Kozlowski
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Krzysztof Kozlowski @ 2014-10-27 15:44 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown, Sangbeom Kim, linux-kernel; +Cc: Krzysztof Kozlowski
The regulator_register() expects array of 'regulator_desc' to be const.
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
---
drivers/regulator/max77693.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/regulator/max77693.c b/drivers/regulator/max77693.c
index c67ff05fc1dd..177dd9d2ce67 100644
--- a/drivers/regulator/max77693.c
+++ b/drivers/regulator/max77693.c
@@ -139,7 +139,7 @@ static struct regulator_ops max77693_charger_ops = {
.enable_mask = SAFEOUT_CTRL_ENSAFEOUT##_num##_MASK , \
}
-static struct regulator_desc regulators[] = {
+static const struct regulator_desc regulators[] = {
regulator_desc_esafeout(1),
regulator_desc_esafeout(2),
{
--
1.9.1
^ permalink raw reply [flat|nested] 5+ messages in thread* [PATCH 3/4] regulator: max77802: Make regulator_desc array const
2014-10-27 15:44 [PATCH 1/4] regulator: dummy: Make regulator_desc array const Krzysztof Kozlowski
2014-10-27 15:44 ` [PATCH 2/4] regulator: max77693: " Krzysztof Kozlowski
@ 2014-10-27 15:44 ` Krzysztof Kozlowski
2014-10-27 15:44 ` [PATCH 4/4] regulator: s2mpa01: " Krzysztof Kozlowski
2014-10-28 0:03 ` [PATCH 1/4] regulator: dummy: " Mark Brown
3 siblings, 0 replies; 5+ messages in thread
From: Krzysztof Kozlowski @ 2014-10-27 15:44 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown, Sangbeom Kim, linux-kernel; +Cc: Krzysztof Kozlowski
The regulator_register() expects array of 'regulator_desc' to be const.
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
---
drivers/regulator/max77802.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/regulator/max77802.c b/drivers/regulator/max77802.c
index 61d03e9f8acf..3e57e4f5c721 100644
--- a/drivers/regulator/max77802.c
+++ b/drivers/regulator/max77802.c
@@ -475,7 +475,7 @@ static struct regulator_ops max77802_buck_dvs_ops = {
.enable_mask = MAX77802_OPMODE_MASK, \
}
-static struct regulator_desc regulators[] = {
+static const struct regulator_desc regulators[] = {
regulator_77802_desc_16_buck(1),
regulator_77802_desc_234_buck(2),
regulator_77802_desc_234_buck(3),
--
1.9.1
^ permalink raw reply [flat|nested] 5+ messages in thread* [PATCH 4/4] regulator: s2mpa01: Make regulator_desc array const
2014-10-27 15:44 [PATCH 1/4] regulator: dummy: Make regulator_desc array const Krzysztof Kozlowski
2014-10-27 15:44 ` [PATCH 2/4] regulator: max77693: " Krzysztof Kozlowski
2014-10-27 15:44 ` [PATCH 3/4] regulator: max77802: " Krzysztof Kozlowski
@ 2014-10-27 15:44 ` Krzysztof Kozlowski
2014-10-28 0:03 ` [PATCH 1/4] regulator: dummy: " Mark Brown
3 siblings, 0 replies; 5+ messages in thread
From: Krzysztof Kozlowski @ 2014-10-27 15:44 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown, Sangbeom Kim, linux-kernel; +Cc: Krzysztof Kozlowski
The regulator_register() expects array of 'regulator_desc' to be const.
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
---
drivers/regulator/s2mpa01.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/regulator/s2mpa01.c b/drivers/regulator/s2mpa01.c
index 4acefa6b462e..2263071414e2 100644
--- a/drivers/regulator/s2mpa01.c
+++ b/drivers/regulator/s2mpa01.c
@@ -298,7 +298,7 @@ static struct regulator_ops s2mpa01_buck_ops = {
.enable_mask = S2MPA01_ENABLE_MASK \
}
-static struct regulator_desc regulators[] = {
+static const struct regulator_desc regulators[] = {
regulator_desc_ldo(1, STEP_25_MV),
regulator_desc_ldo(2, STEP_50_MV),
regulator_desc_ldo(3, STEP_50_MV),
--
1.9.1
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH 1/4] regulator: dummy: Make regulator_desc array const
2014-10-27 15:44 [PATCH 1/4] regulator: dummy: Make regulator_desc array const Krzysztof Kozlowski
` (2 preceding siblings ...)
2014-10-27 15:44 ` [PATCH 4/4] regulator: s2mpa01: " Krzysztof Kozlowski
@ 2014-10-28 0:03 ` Mark Brown
3 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2014-10-28 0:03 UTC (permalink / raw)
To: Krzysztof Kozlowski; +Cc: Liam Girdwood, Sangbeom Kim, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 328 bytes --]
On Mon, Oct 27, 2014 at 04:44:11PM +0100, Krzysztof Kozlowski wrote:
> The regulator_register() expects array of 'regulator_desc' to be const.
Applied all, thanks. One thing with the changelog - "expects" makes it
sound like this is a fix when really it's just a cleanup, it's always OK
to add consts just not to remove them.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread