linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] regulator: fan53555: Constify struct regmap_config and slew_rates array
@ 2015-01-05  9:04 Krzysztof Kozlowski
  2015-01-05  9:05 ` [PATCH 2/3] regulator: max8649: Constify struct regmap_config and regulator_ops Krzysztof Kozlowski
  2015-01-05 20:09 ` [PATCH 1/3] regulator: fan53555: Constify struct regmap_config and slew_rates array Mark Brown
  0 siblings, 2 replies; 6+ messages in thread
From: Krzysztof Kozlowski @ 2015-01-05  9:04 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, linux-kernel; +Cc: Krzysztof Kozlowski

The regmap_config struct may be const because it is not modified by the
driver and regmap_init() accepts pointer to const. Make const also
slew_rates array.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
---
 drivers/regulator/fan53555.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/regulator/fan53555.c b/drivers/regulator/fan53555.c
index 6c43ab2d5121..3c25db89a021 100644
--- a/drivers/regulator/fan53555.c
+++ b/drivers/regulator/fan53555.c
@@ -147,7 +147,7 @@ static unsigned int fan53555_get_mode(struct regulator_dev *rdev)
 		return REGULATOR_MODE_NORMAL;
 }
 
-static int slew_rates[] = {
+static const int slew_rates[] = {
 	64000,
 	32000,
 	16000,
@@ -296,7 +296,7 @@ static int fan53555_regulator_register(struct fan53555_device_info *di,
 	return PTR_ERR_OR_ZERO(di->rdev);
 }
 
-static struct regmap_config fan53555_regmap_config = {
+static const struct regmap_config fan53555_regmap_config = {
 	.reg_bits = 8,
 	.val_bits = 8,
 };
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/3] regulator: max8649: Constify struct regmap_config and regulator_ops
  2015-01-05  9:04 [PATCH 1/3] regulator: fan53555: Constify struct regmap_config and slew_rates array Krzysztof Kozlowski
@ 2015-01-05  9:05 ` Krzysztof Kozlowski
  2015-01-05  9:05   ` [PATCH 3/3] regulator: tps65023: " Krzysztof Kozlowski
  2015-01-05 20:10   ` [PATCH 2/3] regulator: max8649: " Mark Brown
  2015-01-05 20:09 ` [PATCH 1/3] regulator: fan53555: Constify struct regmap_config and slew_rates array Mark Brown
  1 sibling, 2 replies; 6+ messages in thread
From: Krzysztof Kozlowski @ 2015-01-05  9:05 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, linux-kernel; +Cc: Krzysztof Kozlowski

The regmap_config struct may be const because it is not modified by the
driver and regmap_init() accepts pointer to const. Make struct
regulator_ops const as well.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
---
 drivers/regulator/max8649.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/regulator/max8649.c b/drivers/regulator/max8649.c
index c8bddcc8f911..81229579ece9 100644
--- a/drivers/regulator/max8649.c
+++ b/drivers/regulator/max8649.c
@@ -115,7 +115,7 @@ static unsigned int max8649_get_mode(struct regulator_dev *rdev)
 	return REGULATOR_MODE_NORMAL;
 }
 
-static struct regulator_ops max8649_dcdc_ops = {
+static const struct regulator_ops max8649_dcdc_ops = {
 	.set_voltage_sel = regulator_set_voltage_sel_regmap,
 	.get_voltage_sel = regulator_get_voltage_sel_regmap,
 	.list_voltage	= regulator_list_voltage_linear,
@@ -143,7 +143,7 @@ static struct regulator_desc dcdc_desc = {
 	.enable_is_inverted = true,
 };
 
-static struct regmap_config max8649_regmap_config = {
+static const struct regmap_config max8649_regmap_config = {
 	.reg_bits = 8,
 	.val_bits = 8,
 };
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 3/3] regulator: tps65023: Constify struct regmap_config and regulator_ops
  2015-01-05  9:05 ` [PATCH 2/3] regulator: max8649: Constify struct regmap_config and regulator_ops Krzysztof Kozlowski
@ 2015-01-05  9:05   ` Krzysztof Kozlowski
  2015-01-05 20:11     ` Mark Brown
  2015-01-05 20:10   ` [PATCH 2/3] regulator: max8649: " Mark Brown
  1 sibling, 1 reply; 6+ messages in thread
From: Krzysztof Kozlowski @ 2015-01-05  9:05 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, linux-kernel; +Cc: Krzysztof Kozlowski

The regmap_config struct may be const because it is not modified by
the driver and regmap_init() accepts pointer to const. Make struct
regulator_ops const as well.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
---
 drivers/regulator/tps65023-regulator.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/regulator/tps65023-regulator.c b/drivers/regulator/tps65023-regulator.c
index 7380af8bd50d..b941e564b3f3 100644
--- a/drivers/regulator/tps65023-regulator.c
+++ b/drivers/regulator/tps65023-regulator.c
@@ -173,7 +173,7 @@ static int tps65023_dcdc_set_voltage_sel(struct regulator_dev *dev,
 }
 
 /* Operations permitted on VDCDCx */
-static struct regulator_ops tps65023_dcdc_ops = {
+static const struct regulator_ops tps65023_dcdc_ops = {
 	.is_enabled = regulator_is_enabled_regmap,
 	.enable = regulator_enable_regmap,
 	.disable = regulator_disable_regmap,
@@ -184,7 +184,7 @@ static struct regulator_ops tps65023_dcdc_ops = {
 };
 
 /* Operations permitted on LDOx */
-static struct regulator_ops tps65023_ldo_ops = {
+static const struct regulator_ops tps65023_ldo_ops = {
 	.is_enabled = regulator_is_enabled_regmap,
 	.enable = regulator_enable_regmap,
 	.disable = regulator_disable_regmap,
@@ -194,7 +194,7 @@ static struct regulator_ops tps65023_ldo_ops = {
 	.map_voltage = regulator_map_voltage_ascend,
 };
 
-static struct regmap_config tps65023_regmap_config = {
+static const struct regmap_config tps65023_regmap_config = {
 	.reg_bits = 8,
 	.val_bits = 8,
 };
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/3] regulator: fan53555: Constify struct regmap_config and slew_rates array
  2015-01-05  9:04 [PATCH 1/3] regulator: fan53555: Constify struct regmap_config and slew_rates array Krzysztof Kozlowski
  2015-01-05  9:05 ` [PATCH 2/3] regulator: max8649: Constify struct regmap_config and regulator_ops Krzysztof Kozlowski
@ 2015-01-05 20:09 ` Mark Brown
  1 sibling, 0 replies; 6+ messages in thread
From: Mark Brown @ 2015-01-05 20:09 UTC (permalink / raw)
  To: Krzysztof Kozlowski; +Cc: Liam Girdwood, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 250 bytes --]

On Mon, Jan 05, 2015 at 10:04:19AM +0100, Krzysztof Kozlowski wrote:
> The regmap_config struct may be const because it is not modified by the
> driver and regmap_init() accepts pointer to const. Make const also
> slew_rates array.

Applied, thanks.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 2/3] regulator: max8649: Constify struct regmap_config and regulator_ops
  2015-01-05  9:05 ` [PATCH 2/3] regulator: max8649: Constify struct regmap_config and regulator_ops Krzysztof Kozlowski
  2015-01-05  9:05   ` [PATCH 3/3] regulator: tps65023: " Krzysztof Kozlowski
@ 2015-01-05 20:10   ` Mark Brown
  1 sibling, 0 replies; 6+ messages in thread
From: Mark Brown @ 2015-01-05 20:10 UTC (permalink / raw)
  To: Krzysztof Kozlowski; +Cc: Liam Girdwood, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 257 bytes --]

On Mon, Jan 05, 2015 at 10:05:47AM +0100, Krzysztof Kozlowski wrote:
> The regmap_config struct may be const because it is not modified by the
> driver and regmap_init() accepts pointer to const. Make struct
> regulator_ops const as well.

Applied, thanks.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 3/3] regulator: tps65023: Constify struct regmap_config and regulator_ops
  2015-01-05  9:05   ` [PATCH 3/3] regulator: tps65023: " Krzysztof Kozlowski
@ 2015-01-05 20:11     ` Mark Brown
  0 siblings, 0 replies; 6+ messages in thread
From: Mark Brown @ 2015-01-05 20:11 UTC (permalink / raw)
  To: Krzysztof Kozlowski; +Cc: Liam Girdwood, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 257 bytes --]

On Mon, Jan 05, 2015 at 10:05:48AM +0100, Krzysztof Kozlowski wrote:
> The regmap_config struct may be const because it is not modified by
> the driver and regmap_init() accepts pointer to const. Make struct
> regulator_ops const as well.

Applied, thanks.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-01-05 20:11 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-05  9:04 [PATCH 1/3] regulator: fan53555: Constify struct regmap_config and slew_rates array Krzysztof Kozlowski
2015-01-05  9:05 ` [PATCH 2/3] regulator: max8649: Constify struct regmap_config and regulator_ops Krzysztof Kozlowski
2015-01-05  9:05   ` [PATCH 3/3] regulator: tps65023: " Krzysztof Kozlowski
2015-01-05 20:11     ` Mark Brown
2015-01-05 20:10   ` [PATCH 2/3] regulator: max8649: " Mark Brown
2015-01-05 20:09 ` [PATCH 1/3] regulator: fan53555: Constify struct regmap_config and slew_rates array Mark Brown

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).