diff options
Diffstat (limited to 'drivers/usb/core/sysfs.c')
| -rw-r--r-- | drivers/usb/core/sysfs.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/drivers/usb/core/sysfs.c b/drivers/usb/core/sysfs.c index 9a56e3adf476..682e8256b95d 100644 --- a/drivers/usb/core/sysfs.c +++ b/drivers/usb/core/sysfs.c | |||
| @@ -253,6 +253,15 @@ show_removable(struct device *dev, struct device_attribute *attr, char *buf) | |||
| 253 | } | 253 | } |
| 254 | static DEVICE_ATTR(removable, S_IRUGO, show_removable, NULL); | 254 | static DEVICE_ATTR(removable, S_IRUGO, show_removable, NULL); |
| 255 | 255 | ||
| 256 | static ssize_t | ||
| 257 | show_ltm_capable(struct device *dev, struct device_attribute *attr, char *buf) | ||
| 258 | { | ||
| 259 | if (usb_device_supports_ltm(to_usb_device(dev))) | ||
| 260 | return sprintf(buf, "%s\n", "yes"); | ||
| 261 | return sprintf(buf, "%s\n", "no"); | ||
| 262 | } | ||
| 263 | static DEVICE_ATTR(ltm_capable, S_IRUGO, show_ltm_capable, NULL); | ||
| 264 | |||
| 256 | #ifdef CONFIG_PM | 265 | #ifdef CONFIG_PM |
| 257 | 266 | ||
| 258 | static ssize_t | 267 | static ssize_t |
| @@ -649,6 +658,7 @@ static struct attribute *dev_attrs[] = { | |||
| 649 | &dev_attr_authorized.attr, | 658 | &dev_attr_authorized.attr, |
| 650 | &dev_attr_remove.attr, | 659 | &dev_attr_remove.attr, |
| 651 | &dev_attr_removable.attr, | 660 | &dev_attr_removable.attr, |
| 661 | &dev_attr_ltm_capable.attr, | ||
| 652 | NULL, | 662 | NULL, |
| 653 | }; | 663 | }; |
| 654 | static struct attribute_group dev_attr_grp = { | 664 | static struct attribute_group dev_attr_grp = { |
| @@ -840,7 +850,7 @@ static ssize_t show_modalias(struct device *dev, | |||
| 840 | alt = intf->cur_altsetting; | 850 | alt = intf->cur_altsetting; |
| 841 | 851 | ||
| 842 | return sprintf(buf, "usb:v%04Xp%04Xd%04Xdc%02Xdsc%02Xdp%02X" | 852 | return sprintf(buf, "usb:v%04Xp%04Xd%04Xdc%02Xdsc%02Xdp%02X" |
| 843 | "ic%02Xisc%02Xip%02X\n", | 853 | "ic%02Xisc%02Xip%02Xin%02X\n", |
| 844 | le16_to_cpu(udev->descriptor.idVendor), | 854 | le16_to_cpu(udev->descriptor.idVendor), |
| 845 | le16_to_cpu(udev->descriptor.idProduct), | 855 | le16_to_cpu(udev->descriptor.idProduct), |
| 846 | le16_to_cpu(udev->descriptor.bcdDevice), | 856 | le16_to_cpu(udev->descriptor.bcdDevice), |
| @@ -849,7 +859,8 @@ static ssize_t show_modalias(struct device *dev, | |||
| 849 | udev->descriptor.bDeviceProtocol, | 859 | udev->descriptor.bDeviceProtocol, |
| 850 | alt->desc.bInterfaceClass, | 860 | alt->desc.bInterfaceClass, |
| 851 | alt->desc.bInterfaceSubClass, | 861 | alt->desc.bInterfaceSubClass, |
| 852 | alt->desc.bInterfaceProtocol); | 862 | alt->desc.bInterfaceProtocol, |
| 863 | alt->desc.bInterfaceNumber); | ||
| 853 | } | 864 | } |
| 854 | static DEVICE_ATTR(modalias, S_IRUGO, show_modalias, NULL); | 865 | static DEVICE_ATTR(modalias, S_IRUGO, show_modalias, NULL); |
| 855 | 866 | ||
