[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200617223247.25566-4-rikard.falkeborn@gmail.com>
Date: Thu, 18 Jun 2020 00:32:45 +0200
From: Rikard Falkeborn <rikard.falkeborn@...il.com>
To: unlisted-recipients:; (no To-header on input)
Cc: lgirdwood@...il.com, broonie@...nel.org,
linux-kernel@...r.kernel.org,
Rikard Falkeborn <rikard.falkeborn@...il.com>
Subject: [PATCH 3/5] regulator: ltc3676: Constify ltc3676_regulators
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@...il.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
Powered by blists - more mailing lists