usb: gadget: Fix binding to UDC via configfs interface
authorKrzysztof Opasiak <k.opasiak@samsung.com>
Thu, 5 May 2016 08:46:05 +0000 (10:46 +0200)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Tue, 31 May 2016 07:02:53 +0000 (10:02 +0300)
commitf1bddbb3de60872acc2446eee97dbeb0a6d57acb
treefb0786404eafa9f6e3dd7d8c840ea1e17700dd40
parent1a695a905c18548062509178b98bc91e67510864
usb: gadget: Fix binding to UDC via configfs interface

By default user could store only valid UDC name in configfs UDC
attr by doing:

echo $UDC_NAME > UDC

Commit (855ed04 "usb: gadget: udc-core: independent registration of
gadgets and gadget drivers") broke this behavior and allowed to store
any arbitrary string in UDC file and udc core was waiting for such
controller to appear.

echo "any arbitrary string here" > UDC

This commit fix this by adding a flag which prevents configfs
gadget from being added to list of pending drivers if UDC with
given name has not been found.

Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/gadget/configfs.c
drivers/usb/gadget/udc/udc-core.c
include/linux/usb/gadget.h
This page took 0.044743 seconds and 5 git commands to generate.