usb: gadget: configfs: Check USB configuration before adding
authorWesley Cheng <wcheng@codeaurora.org>
Sat, 10 Jul 2021 09:13:11 +0000 (02:13 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 12 Jul 2021 07:37:25 +0000 (09:37 +0200)
commit7adf9e3adc398e5d5b7af91e5fdfafa70e86dd36
treea802d865c7b1f552efde06231d27c92a6300d2ac
parentce7d0008c2356626f69f37ef1afce8fbc83fe142
usb: gadget: configfs: Check USB configuration before adding

Ensure that the USB gadget is able to support the configuration being
added based on the number of endpoints required from all interfaces.  This
is for accounting for any bandwidth or space limitations.

Signed-off-by: Wesley Cheng <wcheng@codeaurora.org>
Link: https://lore.kernel.org/r/1625908395-5498-3-git-send-email-wcheng@codeaurora.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/configfs.c