char:ipmi: Fix a not-used variable on a non-ACPI system
authorCorey Minyard <corey@minyard.net>
Sun, 22 Dec 2024 20:55:56 +0000 (14:55 -0600)
committerCorey Minyard <corey@minyard.net>
Sun, 22 Dec 2024 20:57:47 +0000 (14:57 -0600)
Put some code into APCI ifdefs to avoid a not-used variable warning.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202412222349.R7qW7Q2t-lkp@intel.com/
Signed-off-by: Corey Minyard <corey@minyard.net>
drivers/char/ipmi/ipmb_dev_int.c

index 8a14fd0291d89b9afce0b944ef99b56862a6f660..ee2bdc7ed0daa9b5e27d920433eedb2cffd81140 100644 (file)
@@ -358,11 +358,13 @@ static const struct i2c_device_id ipmb_id[] = {
 };
 MODULE_DEVICE_TABLE(i2c, ipmb_id);
 
+#ifdef CONFIG_ACPI
 static const struct acpi_device_id acpi_ipmb_id[] = {
        { "IPMB0001", 0 },
        {},
 };
 MODULE_DEVICE_TABLE(acpi, acpi_ipmb_id);
+#endif
 
 static struct i2c_driver ipmb_driver = {
        .driver = {