mirror of https://lore.kernel.org/lkml/
 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	[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

all inboxes | Powered by JetHome®