Skip to content

Commit d673231

Browse files
committed
hwmon: (xdpe12284) Fix build warning seen if CONFIG_SENSORS_XDPE122_REGULATOR is disabled
0-day reports: drivers/hwmon/pmbus/xdpe12284.c:127:36: warning: unused variable 'xdpe122_reg_desc' This is seen if CONFIG_SENSORS_XDPE122_REGULATOR is not enabled. Mark xdpe122_reg_desc as __maybe_unused to fix the problem. Fixes: f53bfe4 ("hwmon: (xdpe12284) Add regulator support") Reported-by: kernel test robot <lkp@intel.com> Cc: Marcello Sylvester Bauer <sylv@sylv.io> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
1 parent 3123109 commit d673231

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/hwmon/pmbus/xdpe12284.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ static int xdpe122_identify(struct i2c_client *client,
124124
return 0;
125125
}
126126

127-
static const struct regulator_desc xdpe122_reg_desc[] = {
127+
static const struct regulator_desc __maybe_unused xdpe122_reg_desc[] = {
128128
PMBUS_REGULATOR("vout", 0),
129129
PMBUS_REGULATOR("vout", 1),
130130
};

0 commit comments

Comments
 (0)