Skip to contentSkip to conversation

mfd/axp20x-i2c: Fix "CONFIG_ACPI" is not defined warning

PATCH In review Axel Lin 2 participants 2 messages Jul 7, 2020 – Jul 8, 2020

Subsystems (2)
lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 mfd/axp20x-i2c: Fix "CONFIG_ACPI" is not defined warning

Fix below build warning:

drivers/mfd/axp20x-i2c.c:82:5: warning: "CONFIG_ACPI" is not defined, evaluates to 0 [-Wundef]
82 | #if CONFIG_ACPI

      |     ^~~~~~~~~~~
Fixes 20f359cb236b ("mfd: axp20x-i2c: Do not define 'struct acpi_device_id' when !CONFIG_ACPI")
---
 drivers/mfd/axp20x-i2c.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mfd/axp20x-i2c.c +1 -1
index bd271fbe1ec1..3c930316d48b 100644
@@ -79,7 +79,7 @@ static const struct i2c_device_id axp20x_i2c_id[] = {
 };
 MODULE_DEVICE_TABLE(i2c, axp20x_i2c_id);
 
-#if CONFIG_ACPI
+#ifdef CONFIG_ACPI
 static const struct acpi_device_id axp20x_i2c_acpi_match[] = {
 	{
 		.id = "INT33F4",
Signature · 1 line
2.25.1
#1 lore raw
Quoted 11 lines · Axel Lin

Fix below build warning:

drivers/mfd/axp20x-i2c.c:82:5: warning: "CONFIG_ACPI" is not defined, evaluates to 0 [-Wundef]
82 | #if CONFIG_ACPI

      |     ^~~~~~~~~~~
Fixes 20f359cb236b ("mfd: axp20x-i2c: Do not define 'struct acpi_device_id' when !CONFIG_ACPI")
---
 drivers/mfd/axp20x-i2c.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

This should already be fixed.

Thanks anyway Axel.

Quoted 13 lines
drivers/mfd/axp20x-i2c.c +1 -1
index bd271fbe1ec1..3c930316d48b 100644
@@ -79,7 +79,7 @@ static const struct i2c_device_id axp20x_i2c_id[] = {
 };
 MODULE_DEVICE_TABLE(i2c, axp20x_i2c_id);
 
-#if CONFIG_ACPI
+#ifdef CONFIG_ACPI
 static const struct acpi_device_id axp20x_i2c_acpi_match[] = {
 	{
 		.id = "INT33F4",
Signature · 4 lines
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog