Skip to contentSkip to conversation

rtc: max31335: use correct CONFIG symbol in IS_REACHABLE()

PATCH Applied Randy Dunlap 3 participants 3 messages Jan 8 – Jan 19

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rtc: max31335: use correct CONFIG symbol in IS_REACHABLE()

IS_REACHABLE() is meant to be used with full symbol names from a kernel .config file, not the shortened symbols used in Kconfig files, so change HWMON to CONFIG_HWMON in 3 places.

Fixes dedaf03b99d6 ("rtc: max31335: add driver support")

---
Cc: Antoniu Miclaus <[email protected]>
Cc: Alexandre Belloni <[email protected]>
Cc: [email protected]

 drivers/rtc/rtc-max31335.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/rtc/rtc-max31335.c +3 -3
@@ -591,7 +591,7 @@ static struct nvmem_config max31335_nvme
 	.size = MAX31335_RAM_SIZE,
 };
 
-#if IS_REACHABLE(HWMON)
+#if IS_REACHABLE(CONFIG_HWMON)
 static int max31335_read_temp(struct device *dev, enum hwmon_sensor_types type,
 			      u32 attr, int channel, long *val)
 {
@@ -672,7 +672,7 @@ static int max31335_clkout_register(stru
 static int max31335_probe(struct i2c_client *client)
 {
 	struct max31335_data *max31335;
-#if IS_REACHABLE(HWMON)
+#if IS_REACHABLE(CONFIG_HWMON)
 	struct device *hwmon;
 #endif
 	const struct chip_desc *match;
@@ -727,7 +727,7 @@ static int max31335_probe(struct i2c_cli
 		return dev_err_probe(&client->dev, ret,
 				     "cannot register rtc nvmem\n");
 
-#if IS_REACHABLE(HWMON)
+#if IS_REACHABLE(CONFIG_HWMON)
 	if (max31335->chip->temp_reg) {
 		hwmon = devm_hwmon_device_register_with_info(&client->dev, client->name, max31335,
 							     &max31335_chip_info, NULL);
Acked-by on v1 1/1
#1 lore raw
Quoted 7 lines · Randy Dunlap

IS_REACHABLE() is meant to be used with full symbol names from a kernel .config file, not the shortened symbols used in Kconfig files, so change HWMON to CONFIG_HWMON in 3 places.

Fixes dedaf03b99d6 ("rtc: max31335: add driver support")

---

Quoted 37 lines
Cc Antoniu Miclaus <[email protected]>
Cc Alexandre Belloni <[email protected]>

 drivers/rtc/rtc-max31335.c |    6 +++---

 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/rtc/rtc-max31335.c +0 -0
@@ -591,7 +591,7 @@ static struct nvmem_config max31335_nvme
  	.size = MAX31335_RAM_SIZE,
  };

drivers/rtc/rtc-max31335.c +1 -1
-#if IS_REACHABLE(HWMON)
+#if IS_REACHABLE(CONFIG_HWMON)

 static int max31335_read_temp(struct device *dev, enum hwmon_sensor_types type, u32 attr, int channel, long *val)
 {

drivers/rtc/rtc-max31335.c +1 -1
@@ -672,7 +672,7 @@ static int max31335_clkout_register(stru
  static int max31335_probe(struct i2c_client *client)
  {
  	struct max31335_data *max31335;
-#if IS_REACHABLE(HWMON)
+#if IS_REACHABLE(CONFIG_HWMON)
  	struct device *hwmon;
  #endif
  	const struct chip_desc *match;
@@ -727,7 +727,7 @@ static int max31335_probe(struct i2c_cli
  		return dev_err_probe(&client->dev, ret,
  				     "cannot register rtc nvmem\n");

drivers/rtc/rtc-max31335.c +1 -1
-#if IS_REACHABLE(HWMON)
+#if IS_REACHABLE(CONFIG_HWMON)

  if (max31335->chip->temp_reg) {
  hwmon = devm_hwmon_device_register_with_info(&client->dev, client->name, max31335,
       &max31335_chip_info, NULL);

maintainer Applied
#2 lore raw
In reply to Randy Dunlap
Quoted 5 lines · Randy Dunlap

IS_REACHABLE() is meant to be used with full symbol names from a kernel .config file, not the shortened symbols used in Kconfig files, so change HWMON to CONFIG_HWMON in 3 places.

Applied, thanks!

[1/1] rtc: max31335: use correct CONFIG symbol in IS_REACHABLE()

      https://git.kernel.org/abelloni/c/d5aca9a17f6d

Best regards,

Signature · 3 lines
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com