diff options
Diffstat (limited to 'drivers/usb/gadget/printer.c')
-rw-r--r-- | drivers/usb/gadget/printer.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/drivers/usb/gadget/printer.c b/drivers/usb/gadget/printer.c index 5d3e697b7d5d..68a0efbc2719 100644 --- a/drivers/usb/gadget/printer.c +++ b/drivers/usb/gadget/printer.c | |||
@@ -962,23 +962,15 @@ printer_set_config(struct printer_dev *dev, unsigned number) | |||
962 | usb_gadget_vbus_draw(dev->gadget, | 962 | usb_gadget_vbus_draw(dev->gadget, |
963 | dev->gadget->is_otg ? 8 : 100); | 963 | dev->gadget->is_otg ? 8 : 100); |
964 | } else { | 964 | } else { |
965 | char *speed; | ||
966 | unsigned power; | 965 | unsigned power; |
967 | 966 | ||
968 | power = 2 * config_desc.bMaxPower; | 967 | power = 2 * config_desc.bMaxPower; |
969 | usb_gadget_vbus_draw(dev->gadget, power); | 968 | usb_gadget_vbus_draw(dev->gadget, power); |
970 | 969 | ||
971 | switch (gadget->speed) { | ||
972 | case USB_SPEED_FULL: speed = "full"; break; | ||
973 | #ifdef CONFIG_USB_GADGET_DUALSPEED | ||
974 | case USB_SPEED_HIGH: speed = "high"; break; | ||
975 | #endif | ||
976 | default: speed = "?"; break; | ||
977 | } | ||
978 | |||
979 | dev->config = number; | 970 | dev->config = number; |
980 | INFO(dev, "%s speed config #%d: %d mA, %s\n", | 971 | INFO(dev, "%s config #%d: %d mA, %s\n", |
981 | speed, number, power, driver_desc); | 972 | usb_speed_string(gadget->speed), |
973 | number, power, driver_desc); | ||
982 | } | 974 | } |
983 | return result; | 975 | return result; |
984 | } | 976 | } |