power: supply: code cleanup
diff mbox series

Message ID 31d85698-0fc0-6dcc-d3fc-41151f79a9cb@noureddine.xyz
State New, archived
Headers show
  • power: supply: code cleanup
Related show

Commit Message

Nour-eddine Taleb May 15, 2021, 11:09 a.m. UTC
replace declarations like:
	char *foo = "bar";
	char foo[] = "bar"
because the first declaration creates two variables, one for the string,
and the second for the pointer to the string.
while the second declaration create just one variable for the string,
which makes smaller bin.

Signed-off-by: Nour-eddine Taleb <contact@noureddine.xyz>
  drivers/power/supply/act8945a_charger.c | 4 ++--
  drivers/power/supply/bd70528-charger.c  | 4 ++--
  2 files changed, 4 insertions(+), 4 deletions(-)

diff mbox series

diff --git a/drivers/power/supply/act8945a_charger.c 
index e9b5f4283772..d7002b30e74c 100644
--- a/drivers/power/supply/act8945a_charger.c
+++ b/drivers/power/supply/act8945a_charger.c
@@ -15,8 +15,8 @@ 
  #include <linux/regmap.h>
  #include <linux/gpio/consumer.h>

-static const char *act8945a_charger_model = "ACT8945A";
-static const char *act8945a_charger_manufacturer = "Active-semi";
+static const char act8945a_charger_model[] = "ACT8945A";
+static const char act8945a_charger_manufacturer[] = "Active-semi";

   * ACT8945A Charger Register Map
diff --git a/drivers/power/supply/bd70528-charger.c 
index 7c1f0b99c71b..0b7575ed80d5 100644
--- a/drivers/power/supply/bd70528-charger.c
+++ b/drivers/power/supply/bd70528-charger.c
@@ -87,8 +87,8 @@ 
  #define CHG_STAT_TSD_TOPOFF	0x22
  #define CHG_STAT_BAT_ERR	0x7f

-static const char *bd70528_charger_model = "BD70528";
-static const char *bd70528_charger_manufacturer = "ROHM Semiconductors";
+static const char bd70528_charger_model[] = "BD70528";
+static const char bd70528_charger_manufacturer[] = "ROHM Semiconductors";

  #define BD_ERR_IRQ_HND(_name_, _wrn_)					\
  static irqreturn_t bd0528_##_name_##_interrupt(int irq, void *arg)	\