]> git.baikalelectronics.ru Git - kernel.git/commit
usb: composite: add bind_deactivated flag to usb_function
authorRobert Baldyga <r.baldyga@samsung.com>
Mon, 4 May 2015 12:55:13 +0000 (14:55 +0200)
committerFelipe Balbi <balbi@ti.com>
Wed, 29 Jul 2015 14:59:19 +0000 (09:59 -0500)
commit41fb2cd62d5ef01cad9713e20678ec2ff593346d
tree398dcc6d054fbf8c56c0bb767f3b63e4447767ce
parente9988a082c2558666998a1cfa13cb9364ee9edd7
usb: composite: add bind_deactivated flag to usb_function

This patch introduces 'bind_deactivated' flag in struct usb_function.
Functions which don't want to be activated automatically after bind should
set this flag, and when they start to be ready to work they should call
usb_function_activate().

When USB function sets 'bind_deactivated' flag, initial deactivation
counter is incremented automatically, so there is no need to call
usb_function_deactivate() in function bind.

Signed-off-by: Robert Baldyga <r.baldyga@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/gadget/composite.c
include/linux/usb/composite.h