Commit b548674e authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Jonathan Cameron

iio: gyro: mpu3050: add I2C dependency

The new mpu3050 driver fails to build if I2C is disabled:

drivers/iio/built-in.o: In function `mpu3050_i2c_driver_exit':
mpu3050-i2c.c:(.exit.text+0x17f): undefined reference to `i2c_del_driver'
drivers/iio/built-in.o: In function `mpu3050_i2c_driver_init':
mpu3050-i2c.c:(.init.text+0x215): undefined reference to `i2c_register_driver'

This adds a Kconfig dependency to ensure we only build it when I2C
is available.

Fixes: 3904b28e ("iio: gyro: Add driver for the MPU-3050 gyroscope")
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Acked-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent 630e7ab4
......@@ -93,6 +93,7 @@ config MPU3050
config MPU3050_I2C
tristate "Invensense MPU3050 devices on I2C"
depends on !(INPUT_MPU3050=y || INPUT_MPU3050=m)
depends on I2C
select MPU3050
select REGMAP_I2C
select I2C_MUX
......
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