usb: typec: ucsi: Add conditional dependency on USB role switch
authorHeikki Krogerus <heikki.krogerus@linux.intel.com>
Tue, 19 Jan 2021 08:34:05 +0000 (11:34 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 19 Jan 2021 12:30:19 +0000 (13:30 +0100)
Preventing the driver from being built-in when USB Role
Switch Class is being build as module. That fixes a
potential undefined reference error.

Fixes: 89795852c9c4 ("usb: typec: ucsi: Add support for USB role switch")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20210119083405.18325-1-heikki.krogerus@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/typec/ucsi/Kconfig

index 2192d7c..5e9b37b 100644 (file)
@@ -3,6 +3,7 @@
 config TYPEC_UCSI
        tristate "USB Type-C Connector System Software Interface driver"
        depends on !CPU_BIG_ENDIAN
+       depends on USB_ROLE_SWITCH || !USB_ROLE_SWITCH
        help
          USB Type-C Connector System Software Interface (UCSI) is a
          specification for an interface that allows the operating system to