procfs: do not confuse jiffies with cputime64_t
[zen-stable.git] / drivers / usb / usb-common.c
blobd29503e954abf829c71e69f08ec995da39291481
1 /*
2 * Provides code common for host and device side USB.
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License as
6 * published by the Free Software Foundation, version 2.
8 * If either host side (ie. CONFIG_USB=y) or device side USB stack
9 * (ie. CONFIG_USB_GADGET=y) is compiled in the kernel, this module is
10 * compiled-in as well. Otherwise, if either of the two stacks is
11 * compiled as module, this file is compiled as module as well.
14 #include <linux/kernel.h>
15 #include <linux/module.h>
16 #include <linux/usb/ch9.h>
18 const char *usb_speed_string(enum usb_device_speed speed)
20 static const char *const names[] = {
21 [USB_SPEED_UNKNOWN] = "UNKNOWN",
22 [USB_SPEED_LOW] = "low-speed",
23 [USB_SPEED_FULL] = "full-speed",
24 [USB_SPEED_HIGH] = "high-speed",
25 [USB_SPEED_WIRELESS] = "wireless",
26 [USB_SPEED_SUPER] = "super-speed",
29 if (speed < 0 || speed >= ARRAY_SIZE(names))
30 speed = USB_SPEED_UNKNOWN;
31 return names[speed];
33 EXPORT_SYMBOL_GPL(usb_speed_string);
35 MODULE_LICENSE("GPL");