Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

regulator: fan53880: Add support for COMPILE_TEST

This patch adds support for COMPILE_TEST while fixing a warning when
no support for device tree is there.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Christoph Fritz <chf.fritz@googlemail.com>
Link: https://lore.kernel.org/r/1c437154873ace65ff738a0ebca511308f1cecc1.camel@googlemail.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Christoph Fritz and committed by
Mark Brown
318b8a09 083986c2

+3 -1
+1 -1
drivers/regulator/Kconfig
··· 338 338 339 339 config REGULATOR_FAN53880 340 340 tristate "Fairchild FAN53880 Regulator" 341 - depends on I2C 341 + depends on I2C && (OF || COMPILE_TEST) 342 342 select REGMAP_I2C 343 343 help 344 344 This driver supports Fairchild (ON Semiconductor) FAN53880
+2
drivers/regulator/fan53880.c
··· 155 155 return 0; 156 156 } 157 157 158 + #ifdef CONFIG_OF 158 159 static const struct of_device_id fan53880_dt_ids[] = { 159 160 { .compatible = "onnn,fan53880", }, 160 161 {} 161 162 }; 162 163 MODULE_DEVICE_TABLE(of, fan53880_dt_ids); 164 + #endif 163 165 164 166 static const struct i2c_device_id fan53880_i2c_id[] = { 165 167 { "fan53880", },