Skip to content

Commit

Permalink
iio: st_sensors: Fix build error
Browse files Browse the repository at this point in the history
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 <[email protected]>
Fixes: 062809e ("iio: make st_sensors drivers use regmap")
Signed-off-by: YueHaibing <[email protected]>
Signed-off-by: Jonathan Cameron <[email protected]>
  • Loading branch information
YueHaibing authored and jic23 committed Aug 25, 2019
1 parent 6b4d682 commit 258128e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/iio/common/st_sensors/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 258128e

Please sign in to comment.