Commit 258128e8 authored by YueHaibing's avatar YueHaibing Committed by Jonathan Cameron

iio: st_sensors: Fix build error

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: default avatarHulk Robot <hulkci@huawei.com>
Fixes: 062809ef ("iio: make st_sensors drivers use regmap")
Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 6b4d6822
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment