From: Rikard Falkeborn <rikard.falkeborn@gmail.com>
To: unlisted-recipients:; (no To-header on input)
Cc: lgirdwood@gmail.com, broonie@kernel.org,
linux-kernel@vger.kernel.org,
Rikard Falkeborn <rikard.falkeborn@gmail.com>
Subject: [PATCH 3/5] regulator: ltc3676: Constify ltc3676_regulators
Date: Thu, 18 Jun 2020 00:32:45 +0200 [thread overview]
Message-ID: <20200617223247.25566-4-rikard.falkeborn@gmail.com> (raw)
In-Reply-To: <20200617223247.25566-1-rikard.falkeborn@gmail.com>
ltc3676_regulators is not modified and can be made const to allow the
compiler to put it in read-only memory.
Before:
text data bss dec hex filename
4361 2064 8 6433 1921 drivers/regulator/ltc3676.o
After:
text data bss dec hex filename
6121 304 8 6433 1921 drivers/regulator/ltc3676.o
Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
---
drivers/regulator/ltc3676.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/regulator/ltc3676.c b/drivers/regulator/ltc3676.c
index e12e52c69e52..093b3e4a6303 100644
--- a/drivers/regulator/ltc3676.c
+++ b/drivers/regulator/ltc3676.c
@@ -221,7 +221,7 @@ static const struct regulator_ops ltc3676_fixed_regulator_ops = {
#define LTC3676_FIXED_REG(_id, _name, _en_reg, _en_bit) \
LTC3676_REG(_id, _name, fixed, LTC3676_ ## _en_reg, _en_bit, 0, 0)
-static struct regulator_desc ltc3676_regulators[LTC3676_NUM_REGULATORS] = {
+static const struct regulator_desc ltc3676_regulators[LTC3676_NUM_REGULATORS] = {
LTC3676_LINEAR_REG(SW1, sw1, BUCK1, DVB1A),
LTC3676_LINEAR_REG(SW2, sw2, BUCK2, DVB2A),
LTC3676_LINEAR_REG(SW3, sw3, BUCK3, DVB3A),
--
2.27.0
next prev parent reply other threads:[~2020-06-17 22:33 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-17 22:32 [PATCH 0/5] regulator: Constify some static struct variables Rikard Falkeborn
2020-06-17 22:32 ` [PATCH 1/5] regulator: anatop: Constify anatop_core_rops Rikard Falkeborn
2020-06-17 22:32 ` [PATCH 2/5] regulator: cpcap: Constify cpcap_regulator_ops Rikard Falkeborn
2020-06-17 22:32 ` Rikard Falkeborn [this message]
2020-06-17 22:32 ` [PATCH 4/5] regulator: max8907: Constify static structs Rikard Falkeborn
2020-06-17 22:32 ` [PATCH 5/5] regulator: max8997: Constify struct regulator_ops Rikard Falkeborn
2020-06-18 13:09 ` [PATCH 0/5] regulator: Constify some static struct variables Mark Brown
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=20200617223247.25566-4-rikard.falkeborn@gmail.com \
--to=rikard.falkeborn@gmail.com \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®