]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
iio: st_sensors: Fix build error
authorYueHaibing <yuehaibing@huawei.com>
Fri, 23 Aug 2019 12:18:52 +0000 (20:18 +0800)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 25 Aug 2019 17:57:55 +0000 (18:57 +0100)
IIO_ST_SENSORS_CORE select IIO_ST_SENSORS_I2C
unconditionally, if REGMAP_I2C is not set, build fails

drivers/iio/common/st_sensors/st_sensors_i2c.o: In function `st_sensors_i2c_configure':
st_sensors_i2c.c:(.text+0x58): undefined reference to `__devm_regmap_init_i2c'

This patch selects REGMAP_I2C to fix it.
IIO_ST_SENSORS_SPI is similar to SPI issue.

Reported-by: Hulk Robot <hulkci@huawei.com>
Fixes: 062809ef7733 ("iio: make st_sensors drivers use regmap")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/common/st_sensors/Kconfig

index 91b98e152d758600b7518e91eef6f4d76acd6310..9364ec7a811fd0769afc00327c38b90b69ed8f48 100644 (file)
@@ -5,9 +5,11 @@
 
 config IIO_ST_SENSORS_I2C
        tristate
+       select REGMAP_I2C
 
 config IIO_ST_SENSORS_SPI
        tristate
+       select REGMAP_SPI
 
 config IIO_ST_SENSORS_CORE
        tristate