aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/f_uac1.c
Commit message (Collapse)AuthorAge
* usb: gadget: f_uac1: Staticize local functionsJingoo Han2013-08-09
| | | | | | | | | | | | | | control_selector_init() is used only in this file. audio_bind_config() is used only in audio.c file to which f_uac1.c is included. Thus, these functions are staticized to fix the following warnings. drivers/usb/gadget/f_uac1.c:698:12: warning: symbol 'control_selector_init' was not declared. Should it be static? drivers/usb/gadget/f_uac1.c:722:12: warning: symbol 'audio_bind_config' was not declared. Should it be static? Acked-by: Jassi Brar <jaswinder.singh@linaro.org> Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: f_uac1: silence an info leak warningDan Carpenter2013-03-04
| | | | | | | | | | | | | | | | | Smatch complains that "len" could be larger than the sizeof(value) so we could be copying garbage here. I have changed this to match how things are done in composite_setup(). The call tree looks like: composite_setup() --> f_audio_setup() --> audio_get_intf_req() composite_setup() expects the return value to be set to sizeof(value). Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: always update HS/SS descriptors and create a copy of themSebastian Andrzej Siewior2012-10-31
| | | | | | | | | | | | | | | | | | | | | | | | HS and SS descriptors are staticaly created. They are updated during the bind process with the endpoint address, string id or interface numbers. After that, the descriptor chain is linked to struct usb_function which is used by composite in order to serve the GET_DESCRIPTOR requests, number of available configs and so on. There is no need to assign the HS descriptor only if the UDC supports HS speed because composite won't report those to the host if HS support has not been reached. The same reasoning is valid for SS. This patch makes sure each function updates HS/SS descriptors unconditionally and uses the newly introduced helper function to create a copy the descriptors for the speed which is supported by the UDC. While at that, also rename f->descriptors to f->fs_descriptors in order to make it more explicit what that means. Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: audio: remove c->highpseed = true from f_midi and uac1Sebastian Andrzej Siewior2012-10-31
| | | | | | | | | Whether highspeed configuration is valid or not is something that composite decides and not the gadget. That gadget can only provide the required descriptors for it. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: audio: Move string IDs to audio.cJassi Brar2012-02-15
| | | | | | | | | Move manufacturer and product string ids into audio.c so as to be reusable by the new uac2 version of gadget driver. Signed-off-by: Yadi Brar <yadi.brar01@gmail.com> Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: Rename audio function to uac1Jassi Brar2012-02-15
The extant USB-Audio function driver complies to UAC_1 spec. So name the files accordingly, paving way for inclusion of a new UAC_2 specified driver. Signed-off-by: Yadi Brar <yadi.brar01@gmail.com> Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org> Signed-off-by: Felipe Balbi <balbi@ti.com>