Skip to content
Commit df8df5e4 authored by Masahiro Yamada's avatar Masahiro Yamada Committed by Greg Kroah-Hartman
Browse files

usb: get rid of 'choice' for legacy gadget drivers

drivers/usb/gadget/legacy/Kconfig creates a 'choice' inside another
'choice'.

The outer choice: line 17 "USB Gadget precomposed configurations"
The inner choice: line 484 "EHCI Debug Device mode"

I wondered why the whole legacy gadget drivers reside in such a big
choice block.

This dates back to 2003, "[PATCH] USB: fix for multiple definition of
`usb_gadget_get_string'". [1]

At that time, the global function, usb_gadget_get_string(), was linked
into multiple drivers. That was why only one driver was able to become
built-in at the same time.

Later, commit a84d9e53 ("usb: gadget: start with libcomposite")
moved usb_gadget_get_string() to a separate module, libcomposite.ko
instead of including usbstring.c from multiple modules.

More and more refactoring was done, and after commit 1bcce939


("usb: gadget: multi: convert to new interface of f_mass_storage"),
you can link multiple gadget drivers into vmlinux without causing
multiple definition error.

This is the only user of the nested choice structure ever. Removing
this mess will make some Kconfig cleanups possible.

[1]: https://git.kernel.org/pub/scm/linux/kernel/git/history/history.git/commit/?id=fee4cf49a81381e072c063571d1aadbb29207408

Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
Acked-by: default avatarFelipe Balbi <balbi@kernel.org>
Link: https://lore.kernel.org/r/20200315154948.26569-1-masahiroy@kernel.org
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 0339f7fb
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