source: src/linux/pb42/linux-3.2/drivers/usb/usb-common.c @ 18155

Last change on this file since 18155 was 18155, checked in by BrainSlayer, 17 months ago

usbcore fails to load of used as module. i dont know why, but i can just guess a kernel bug here

File size: 1.1 KB
Line 
1/*
2 * Provides code common for host and device side USB.
3 *
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.
7 *
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.
12 */
13
14#include <linux/kernel.h>
15#include <linux/module.h>
16#include <linux/usb/ch9.h>
17
18const char *usb_speed_string(enum usb_device_speed speed)
19{
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",
27        };
28
29        if (speed < 0 || speed >= ARRAY_SIZE(names))
30                speed = USB_SPEED_UNKNOWN;
31        return names[speed];
32}
33EXPORT_SYMBOL(usb_speed_string);
34
35MODULE_LICENSE("GPL");
Note: See TracBrowser for help on using the repository browser.