diff options
Diffstat (limited to 'drivers/usb/core/sysfs.c')
-rw-r--r-- | drivers/usb/core/sysfs.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/usb/core/sysfs.c b/drivers/usb/core/sysfs.c index e02590297d3..b04afd06e50 100644 --- a/drivers/usb/core/sysfs.c +++ b/drivers/usb/core/sysfs.c | |||
@@ -169,6 +169,16 @@ show_quirks(struct device *dev, struct device_attribute *attr, char *buf) | |||
169 | } | 169 | } |
170 | static DEVICE_ATTR(quirks, S_IRUGO, show_quirks, NULL); | 170 | static DEVICE_ATTR(quirks, S_IRUGO, show_quirks, NULL); |
171 | 171 | ||
172 | static ssize_t | ||
173 | show_urbnum(struct device *dev, struct device_attribute *attr, char *buf) | ||
174 | { | ||
175 | struct usb_device *udev; | ||
176 | |||
177 | udev = to_usb_device(dev); | ||
178 | return sprintf(buf, "%d\n", atomic_read(&udev->urbnum)); | ||
179 | } | ||
180 | static DEVICE_ATTR(urbnum, S_IRUGO, show_urbnum, NULL); | ||
181 | |||
172 | 182 | ||
173 | #if defined(CONFIG_USB_PERSIST) || defined(CONFIG_USB_SUSPEND) | 183 | #if defined(CONFIG_USB_PERSIST) || defined(CONFIG_USB_SUSPEND) |
174 | static const char power_group[] = "power"; | 184 | static const char power_group[] = "power"; |
@@ -458,6 +468,7 @@ static struct attribute *dev_attrs[] = { | |||
458 | &dev_attr_bConfigurationValue.attr, | 468 | &dev_attr_bConfigurationValue.attr, |
459 | &dev_attr_bmAttributes.attr, | 469 | &dev_attr_bmAttributes.attr, |
460 | &dev_attr_bMaxPower.attr, | 470 | &dev_attr_bMaxPower.attr, |
471 | &dev_attr_urbnum.attr, | ||
461 | /* device attributes */ | 472 | /* device attributes */ |
462 | &dev_attr_idVendor.attr, | 473 | &dev_attr_idVendor.attr, |
463 | &dev_attr_idProduct.attr, | 474 | &dev_attr_idProduct.attr, |