staging: emxx_udc: allow modular build
authorArnd Bergmann <arnd@arndb.de>
Thu, 23 Jun 2016 15:54:25 +0000 (17:54 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 26 Jul 2016 15:47:08 +0000 (08:47 -0700)
commit0bf048abebb6e69be3c1630878419d80944c3cfd
tree1df0bf0fa612e4b482843e05bcb4ea968269e613
parent71da2ba2b2ea80517aaecb3bda485d84c757d833
staging: emxx_udc: allow modular build

A change to the usb gadget core allowed certain API functions to be
part of a loadable module, which breaks having emxx_udc built-in:

drivers/staging/built-in.o: In function `nbu2ss_drv_probe':
(.text+0x2428): undefined reference to `usb_ep_set_maxpacket_limit'

The original patch already fixed tons of other cases that have the
added dependency but apparently missed this one that now appears
in an ARM allmodconfig build.

This patch makes the symbol "tristate", which lets the Kconfig
dependency tracking handle it correctly. To make the module
actually usable, I also revert 0af61e66ee16 ("drivers/staging:
make emxx_udc.c explicitly non-modular"), which Paul Gortmaker
added after noticing that the Kconfig symbol was 'bool'.
Compared to the original version however, I leave out the
'__exit' annotation on the remove callback, as Paul pointed
out that this was incorrect.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 5a8d651a2bde ("usb: gadget: move gadget API functions to udc-core")
Acked-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/emxx_udc/Kconfig
drivers/staging/emxx_udc/emxx_udc.c
This page took 0.026161 seconds and 5 git commands to generate.