]> git.baikalelectronics.ru Git - kernel.git/commit
hwmon: (xdpe12284) Fix build warning seen if CONFIG_SENSORS_XDPE122_REGULATOR is...
authorGuenter Roeck <linux@roeck-us.net>
Fri, 25 Mar 2022 22:24:34 +0000 (15:24 -0700)
committerGuenter Roeck <linux@roeck-us.net>
Mon, 4 Apr 2022 13:54:30 +0000 (06:54 -0700)
commit9cac656b43474bd77ead7db0d7390ddff0e93307
tree04a52aa39229db007ec7b82d88600994396df946
parent6d94017b7b59bab528be97be158d0d602982e3a6
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: e81c31795114 ("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>
drivers/hwmon/pmbus/xdpe12284.c