Skip to content

Commit

Permalink
usb: gadget: apply generic altsetting support check mechanism
Browse files Browse the repository at this point in the history
Replace calls of gadget_supports_altsettings() function (which check altset
support by comparing UDC controller name with hardcoded names) with
gadget_is_altset_supported() which checks generic quirk bitfield.

Signed-off-by: Robert Baldyga <r.baldyga@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
  • Loading branch information
Robert Baldyga authored and Felipe Balbi committed Jul 30, 2015
1 parent 7a896d4 commit 736d093
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion drivers/usb/gadget/function/f_obex.c
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ static inline bool can_support_obex(struct usb_configuration *c)
*
* Altsettings are mandatory, however...
*/
if (!gadget_supports_altsettings(c->cdev->gadget))
if (!gadget_is_altset_supported(c->cdev->gadget))
return false;

/* everything else is *probably* fine ... */
Expand Down
2 changes: 1 addition & 1 deletion drivers/usb/gadget/function/u_ether.h
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ void gether_disconnect(struct gether *);
/* Some controllers can't support CDC Ethernet (ECM) ... */
static inline bool can_support_ecm(struct usb_gadget *gadget)
{
if (!gadget_supports_altsettings(gadget))
if (!gadget_is_altset_supported(gadget))
return false;

/* Everything else is *presumably* fine ... but this is a bit
Expand Down
2 changes: 1 addition & 1 deletion drivers/usb/gadget/legacy/nokia.c
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ static int nokia_bind(struct usb_composite_dev *cdev)
nokia_config_500ma_driver.iConfiguration = status;
nokia_config_100ma_driver.iConfiguration = status;

if (!gadget_supports_altsettings(gadget)) {
if (!gadget_is_altset_supported(gadget)) {
status = -ENODEV;
goto err_usb;
}
Expand Down

0 comments on commit 736d093

Please sign in to comment.