diff mbox series

power: supply: max17042_battery: Do not use CONFIG_ prefix in regular C code

Message ID 20230720123102.154699-1-przemekchwiala@gmail.com
State Superseded
Headers show
Series power: supply: max17042_battery: Do not use CONFIG_ prefix in regular C code | expand

Commit Message

Przemyslaw July 20, 2023, 12:31 p.m. UTC
From: Przemyslaw Chwiala <przemekchwiala@gmail.com>

Using CONFIG_ prefix for macros is not a good practice.
Use CONFIG_ prefix in Kconfig only.

Signed-off-by: Przemyslaw Chwiala <przemekchwiala@gmail.com>
---
 drivers/power/supply/max17042_battery.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Sebastian Reichel Sept. 12, 2023, 7:08 p.m. UTC | #1
On Thu, 20 Jul 2023 14:31:02 +0200, Przemyslaw wrote:
> Using CONFIG_ prefix for macros is not a good practice.
> Use CONFIG_ prefix in Kconfig only.
> 
> 

Applied, thanks!

[1/1] power: supply: max17042_battery: Do not use CONFIG_ prefix in regular C code
      commit: c06a65ac4e4945478f46654920f5af1be1cf384e

Best regards,
diff mbox series

Patch

diff --git a/drivers/power/supply/max17042_battery.c b/drivers/power/supply/max17042_battery.c
index 17ac2ab78c4e..e7d37e422c3f 100644
--- a/drivers/power/supply/max17042_battery.c
+++ b/drivers/power/supply/max17042_battery.c
@@ -36,7 +36,7 @@ 
 #define STATUS_BR_BIT          (1 << 15)
 
 /* Interrupt mask bits */
-#define CONFIG_ALRT_BIT_ENBL	(1 << 2)
+#define CFG_ALRT_BIT_ENBL	(1 << 2)
 
 #define VFSOC0_LOCK		0x0000
 #define VFSOC0_UNLOCK		0x0080
@@ -1116,8 +1116,8 @@  static int max17042_probe(struct i2c_client *client)
 						chip);
 		if (!ret) {
 			regmap_update_bits(chip->regmap, MAX17042_CONFIG,
-					CONFIG_ALRT_BIT_ENBL,
-					CONFIG_ALRT_BIT_ENBL);
+					CFG_ALRT_BIT_ENBL,
+					CFG_ALRT_BIT_ENBL);
 			max17042_set_soc_threshold(chip, 1);
 		} else {
 			client->irq = 0;