diff options
author | Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de> | 2017-02-05 21:44:51 +0100 |
---|---|---|
committer | Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de> | 2017-06-23 20:49:08 +0200 |
commit | c91da92ef2983ab3d50f5d6e5cbaf993fece6339 (patch) | |
tree | 4eeb8952954fcdef9b21c14bc60473806a69415b /include/linux/usb.h | |
parent | a46b825a2f8cabebfa2bdc44342c676c0a620905 (diff) | |
download | kernel_samsung_smdk4412-c91da92ef2983ab3d50f5d6e5cbaf993fece6339.zip kernel_samsung_smdk4412-c91da92ef2983ab3d50f5d6e5cbaf993fece6339.tar.gz kernel_samsung_smdk4412-c91da92ef2983ab3d50f5d6e5cbaf993fece6339.tar.bz2 |
drivers: Backport cdc-wdm and new qmi_wwan
Backport is based on Aleksander Morgado's backport for OpenWrt to the
3.2 kernel[1], so it's a backport of a backport. I added the device
IDs for MDM9x15.
[1] https://gitorious.org/lanedo/linux-stable?p=lanedo:linux-stable.git;a=shortlog;h=refs/heads/v3.2.5-qmi
Signed-off-by: Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de>
Diffstat (limited to 'include/linux/usb.h')
-rw-r--r-- | include/linux/usb.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/usb.h b/include/linux/usb.h index eecfc67e..b639d84 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h @@ -1605,6 +1605,19 @@ usb_maxpacket(struct usb_device *udev, int pipe, int is_out) /* ----------------------------------------------------------------------- */ +/* translate USB error codes to codes user space understands */ +static inline int usb_translate_errors(int error_code) +{ + switch (error_code) { + case 0: + case -ENOMEM: + case -ENODEV: + return error_code; + default: + return -EIO; + } +} + /* Events from the usb core */ #define USB_DEVICE_ADD 0x0001 #define USB_DEVICE_REMOVE 0x0002 |