mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-06 02:50:43 +00:00
iio: accel: fix Kconfig warning
commit762227721f
"iio: accel: st_accel: handle deprecated bindings" attempted to be smart and let users use the old I2C driver and the new SPI driver, or the old SPI driver and the new I2C driver in combination for the LIS3LV02, and put the restrictions on the I2C and SPI subdrivers not not be combined with the old subdrivers. This doesn't work since the IIO ST accel top-level component selects the I2C and SPI subdrivers, resulting in the following Kconfig noise: warning: (IIO_ST_ACCEL_3AXIS) selects IIO_ST_ACCEL_I2C_3AXIS which has unmet direct dependencies (IIO && !SENSORS_LIS3_I2C && IIO_ST_ACCEL_3AXIS && IIO_ST_SENSORS_I2C) warning: (IIO_ST_ACCEL_3AXIS) selects IIO_ST_ACCEL_SPI_3AXIS which has unmet direct dependencies (IIO && !SENSORS_LIS3_SPI && IIO_ST_ACCEL_3AXIS && IIO_ST_SENSORS_SPI) (...) This fixes the issue by putting the dependencies directly in the top-level component instead, so that it never gets to select its unselectable subcomponent. Fixes:762227721f
("iio: accel: st_accel: handle deprecated bindings") Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
08cad739ba
commit
ed8959f40a
1 changed files with 2 additions and 2 deletions
|
@ -120,6 +120,8 @@ config HID_SENSOR_ACCEL_3D
|
|||
config IIO_ST_ACCEL_3AXIS
|
||||
tristate "STMicroelectronics accelerometers 3-Axis Driver"
|
||||
depends on (I2C || SPI_MASTER) && SYSFS
|
||||
depends on !SENSORS_LIS3_I2C
|
||||
depends on !SENSORS_LIS3_SPI
|
||||
select IIO_ST_SENSORS_CORE
|
||||
select IIO_ST_ACCEL_I2C_3AXIS if (I2C)
|
||||
select IIO_ST_ACCEL_SPI_3AXIS if (SPI_MASTER)
|
||||
|
@ -140,13 +142,11 @@ config IIO_ST_ACCEL_3AXIS
|
|||
|
||||
config IIO_ST_ACCEL_I2C_3AXIS
|
||||
tristate
|
||||
depends on !SENSORS_LIS3_I2C
|
||||
depends on IIO_ST_ACCEL_3AXIS
|
||||
depends on IIO_ST_SENSORS_I2C
|
||||
|
||||
config IIO_ST_ACCEL_SPI_3AXIS
|
||||
tristate
|
||||
depends on !SENSORS_LIS3_SPI
|
||||
depends on IIO_ST_ACCEL_3AXIS
|
||||
depends on IIO_ST_SENSORS_SPI
|
||||
|
||||
|
|
Loading…
Reference in a new issue