]> git.baikalelectronics.ru Git - kernel.git/commit
extcon: ptn5150: fix COMPILE_TEST dependencies
authorArnd Bergmann <arnd@arndb.de>
Wed, 6 Mar 2019 11:08:57 +0000 (12:08 +0100)
committerChanwoo Choi <cw00.choi@samsung.com>
Fri, 5 Apr 2019 01:08:37 +0000 (10:08 +0900)
commitc49cc3203b534d14d4c09b8bbccc0bf3f1be1602
tree8ad24d30797a86e487fd7592edc2827dfc9cbad2
parentb7a31ea379e672048cd04255d27306c97d980b41
extcon: ptn5150: fix COMPILE_TEST dependencies

The PTN5150 dependencies look like they were meant to do the
right thing, but they actually should not allow building without
I2C for compile testing, as that results in a Kconfig warning
and subsequent build failure:

WARNING: unmet direct dependencies detected for REGMAP_I2C
  Depends on [m]: I2C [=m]
  Selected by [y]:
  - EXTCON_PTN5150 [=y] && EXTCON [=y] && (I2C [=m] && GPIOLIB [=y] || COMPILE_TEST [=y])
  Selected by [m]:
  - EEPROM_AT24 [=m] && I2C [=m] && SYSFS [=y]
  - KEYBOARD_CAP11XX [=m] && !UML && INPUT [=y] && INPUT_KEYBOARD [=y] && OF [=y] && I2C [=m]
  - INPUT_DRV260X_HAPTICS [=m] && !UML && INPUT_MISC [=y] && INPUT [=y] && I2C [=m] && (GPIOLIB [=y] || COMPILE_TEST [=y])
  - ... [many others]

Add parentheses around the expression so we can compile-test
without GPIOLIB but not without I2C.

Fixes: 11baa1976158 ("extcon: Add support for ptn5150 extcon driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
drivers/extcon/Kconfig