iio: accel: Fix a compilation problem
PATCH 1/1 iio: accel: Fix a compilation problem
The kernel fails when compiling without CONFIG_REGMAP_I2C but with CONFIG_BMA400.
``` ld: drivers/iio/accel/bma400_i2c.o: in function `bma400_i2c_probe': bma400_i2c.c:(.text+0x23): undefined reference to `__devm_regmap_init_i2c' ```
This was caught with one of the kconfigs used by the LKP robot for a separate issue.
Signed-off-by Mario Limonciello <[email protected]>
--- drivers/iio/accel/Kconfig | 2 ++ 1 file changed, 2 insertions(+)
drivers/iio/accel/Kconfig +2 -0
@@ -219,10 +219,12 @@ config BMA400 config BMA400_I2C tristate + select REGMAP_I2C depends on BMA400 config BMA400_SPI tristate + select REGMAP_SPI depends on BMA400 config BMC150_ACCEL
Signature · 1 line
2.34.1
Jonathan Cameron
maintainerQuoted 7 lines · On Wed, 31 Jan 2024 16:52:46 -0600 Mario Limonciello…
The kernel fails when compiling without
CONFIG_REGMAP_I2Cbut withCONFIG_BMA400.``` ld: drivers/iio/accel/bma400_i2c.o: in function `bma400_i2c_probe': bma400_i2c.c:(.text+0x23): undefined reference to `__devm_regmap_init_i2c' ```
Quoted 5 lines
This was caught with one of the kconfigs used by the LKP robot for a separate issue.
Good catch. Ideally would have a fixes tag but it's a bit complex in this case as they two parts landed in different series.
I've added both tags and marked it for stable.
Fixes 465c811f1f20 ("iio: accel: Add driver for the BMA400")
Fixes 9bea10642396 ("iio: accel: bma400: add support for bma400 spi")
Quoted 21 lines
--- drivers/iio/accel/Kconfig | 2 ++ 1 file changed, 2 insertions(+)drivers/iio/accel/Kconfig +2
-0@@ -219,10 +219,12 @@ config BMA400 config BMA400_I2C tristate + select REGMAP_I2C depends on BMA400 config BMA400_SPI tristate + select REGMAP_SPI depends on BMA400 config BMC150_ACCEL