diff options
author | Arnd Bergmann <arnd@arndb.de> | 2016-11-08 08:59:30 -0500 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2016-11-08 15:29:33 -0500 |
commit | b548674ea78417a470a12416eebe016f93e460c0 (patch) | |
tree | 91961459e817bf7e2ee9f7079ccbee0682d1b8b4 /drivers/iio | |
parent | 630e7ab470498f671cea00301f21246333fba2fa (diff) |
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: 3904b28efb2c ("iio: gyro: Add driver for the MPU-3050 gyroscope")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio')
-rw-r--r-- | drivers/iio/gyro/Kconfig | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/iio/gyro/Kconfig b/drivers/iio/gyro/Kconfig index 107b5efd4178..3126cf05e6b9 100644 --- a/drivers/iio/gyro/Kconfig +++ b/drivers/iio/gyro/Kconfig | |||
@@ -93,6 +93,7 @@ config MPU3050 | |||
93 | config MPU3050_I2C | 93 | config MPU3050_I2C |
94 | tristate "Invensense MPU3050 devices on I2C" | 94 | tristate "Invensense MPU3050 devices on I2C" |
95 | depends on !(INPUT_MPU3050=y || INPUT_MPU3050=m) | 95 | depends on !(INPUT_MPU3050=y || INPUT_MPU3050=m) |
96 | depends on I2C | ||
96 | select MPU3050 | 97 | select MPU3050 |
97 | select REGMAP_I2C | 98 | select REGMAP_I2C |
98 | select I2C_MUX | 99 | select I2C_MUX |