diff options
author | Johan Hovold <jhovold@gmail.com> | 2011-11-10 08:58:26 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-11-15 13:47:40 -0500 |
commit | 2c4d6bf295ae10ffcd84f0df6cb642598eb66603 (patch) | |
tree | 5fd9620f72abbc7f5000709ffbc83794d9d9ab08 /drivers/usb/core | |
parent | d83b405383c965498923f3561c3321e2b5df5727 (diff) |
USB: move usb_translate_errors to linux/usb.h
Move usb_translate_errors from usb core to linux/usb.h as it is meant to
be accessed from drivers.
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/core')
-rw-r--r-- | drivers/usb/core/usb.h | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/drivers/usb/core/usb.h b/drivers/usb/core/usb.h index 3888778582c4..45e8479c377d 100644 --- a/drivers/usb/core/usb.h +++ b/drivers/usb/core/usb.h | |||
@@ -132,20 +132,6 @@ static inline int is_usb_device_driver(struct device_driver *drv) | |||
132 | for_devices; | 132 | for_devices; |
133 | } | 133 | } |
134 | 134 | ||
135 | /* translate USB error codes to codes user space understands */ | ||
136 | static inline int usb_translate_errors(int error_code) | ||
137 | { | ||
138 | switch (error_code) { | ||
139 | case 0: | ||
140 | case -ENOMEM: | ||
141 | case -ENODEV: | ||
142 | return error_code; | ||
143 | default: | ||
144 | return -EIO; | ||
145 | } | ||
146 | } | ||
147 | |||
148 | |||
149 | /* for labeling diagnostics */ | 135 | /* for labeling diagnostics */ |
150 | extern const char *usbcore_name; | 136 | extern const char *usbcore_name; |
151 | 137 | ||