From: Axel Lin <axel.lin@ingics.com>
To: Mark Brown <broonie@kernel.org>
Cc: Marek Vasut <marek.vasut+renesas@gmail.com>,
Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>,
Liam Girdwood <lgirdwood@gmail.com>,
linux-kernel@vger.kernel.org, Axel Lin <axel.lin@ingics.com>
Subject: [PATCH 1/3] regulator: bd70528: Constify regulator_linear_range and regulator_ops
Date: Thu, 24 Jan 2019 18:02:07 +0800 [thread overview]
Message-ID: <20190124100209.12275-1-axel.lin@ingics.com> (raw)
Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
drivers/regulator/bd70528-regulator.c | 17 ++++++++---------
1 file changed, 8 insertions(+), 9 deletions(-)
diff --git a/drivers/regulator/bd70528-regulator.c b/drivers/regulator/bd70528-regulator.c
index 0cf261c469b9..72c7f9aa84f3 100644
--- a/drivers/regulator/bd70528-regulator.c
+++ b/drivers/regulator/bd70528-regulator.c
@@ -21,22 +21,22 @@
#define BUCK_RAMPRATE_125MV 1
#define BUCK_RAMP_MAX 250
-static struct regulator_linear_range bd70528_buck1_volts[] = {
+static const struct regulator_linear_range bd70528_buck1_volts[] = {
REGULATOR_LINEAR_RANGE(1200000, 0x00, 0x1, 600000),
REGULATOR_LINEAR_RANGE(2750000, 0x2, 0xf, 50000),
};
-static struct regulator_linear_range bd70528_buck2_volts[] = {
+static const struct regulator_linear_range bd70528_buck2_volts[] = {
REGULATOR_LINEAR_RANGE(1200000, 0x00, 0x1, 300000),
REGULATOR_LINEAR_RANGE(1550000, 0x2, 0xd, 50000),
REGULATOR_LINEAR_RANGE(3000000, 0xe, 0xf, 300000),
};
-static struct regulator_linear_range bd70528_buck3_volts[] = {
+static const struct regulator_linear_range bd70528_buck3_volts[] = {
REGULATOR_LINEAR_RANGE(800000, 0x00, 0xd, 50000),
REGULATOR_LINEAR_RANGE(1800000, 0xe, 0xf, 0),
};
/* All LDOs have same voltage ranges */
-static struct regulator_linear_range bd70528_ldo_volts[] = {
+static const struct regulator_linear_range bd70528_ldo_volts[] = {
REGULATOR_LINEAR_RANGE(1650000, 0x0, 0x07, 50000),
REGULATOR_LINEAR_RANGE(2100000, 0x8, 0x0f, 100000),
REGULATOR_LINEAR_RANGE(2850000, 0x10, 0x19, 50000),
@@ -83,7 +83,7 @@ static int bd70528_led_set_voltage_sel(struct regulator_dev *rdev,
return -EBUSY;
}
-static struct regulator_ops bd70528_buck_ops = {
+static const struct regulator_ops bd70528_buck_ops = {
.enable = regulator_enable_regmap,
.disable = regulator_disable_regmap,
.is_enabled = regulator_is_enabled_regmap,
@@ -94,7 +94,7 @@ static struct regulator_ops bd70528_buck_ops = {
.set_ramp_delay = bd70528_set_ramp_delay,
};
-static struct regulator_ops bd70528_ldo_ops = {
+static const struct regulator_ops bd70528_ldo_ops = {
.enable = regulator_enable_regmap,
.disable = regulator_disable_regmap,
.is_enabled = regulator_is_enabled_regmap,
@@ -105,7 +105,7 @@ static struct regulator_ops bd70528_ldo_ops = {
.set_ramp_delay = bd70528_set_ramp_delay,
};
-static struct regulator_ops bd70528_led_ops = {
+static const struct regulator_ops bd70528_led_ops = {
.enable = regulator_enable_regmap,
.disable = regulator_disable_regmap,
.is_enabled = regulator_is_enabled_regmap,
@@ -114,8 +114,7 @@ static struct regulator_ops bd70528_led_ops = {
.get_voltage_sel = regulator_get_voltage_sel_regmap,
};
-
-static struct regulator_desc bd70528_desc[] = {
+static const struct regulator_desc bd70528_desc[] = {
{
.name = "buck1",
.of_match = of_match_ptr("BUCK1"),
--
2.17.1
next reply other threads:[~2019-01-24 10:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-24 10:02 Axel Lin [this message]
2019-01-24 10:02 ` [PATCH 2/3] regulator: bd718x7: Constify regulator_ops Axel Lin
2019-01-24 10:02 ` [PATCH 3/3] regulator: bd9571mwv: " Axel Lin
2019-01-24 11:21 ` [PATCH 1/3] regulator: bd70528: Constify regulator_linear_range and regulator_ops Matti Vaittinen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190124100209.12275-1-axel.lin@ingics.com \
--to=axel.lin@ingics.com \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=marek.vasut+renesas@gmail.com \
--cc=matti.vaittinen@fi.rohmeurope.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).