aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/core/sysfs.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-07-26 13:23:47 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-07-26 13:23:47 -0400
commit9fc377799bc9bfd8d5cb35d0d1ea2e2458cbdbb3 (patch)
treefe93603b4e33dd50ff5f95ff769a0748b230cdf9 /drivers/usb/core/sysfs.c
parent5e23ae49960d05f578a73ecd19749c45af682c2b (diff)
parente387ef5c47ddeaeaa3cbdc54424cdb7a28dae2c0 (diff)
Merge tag 'usb-3.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Pull USB patches from Greg Kroah-Hartman: "Here's the big USB patch set for the 3.6-rc1 merge window. Lots of little changes in here, primarily for gadget controllers and drivers. There's some scsi changes that I think also went in through the scsi tree, but they merge just fine. All of these patches have been in the linux-next tree for a while now. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>" Fix up trivial conflicts in include/scsi/scsi_device.h (same libata conflict that Jeff had already encountered) * tag 'usb-3.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (207 commits) usb: Add USB_QUIRK_RESET_RESUME for all Logitech UVC webcams usb: Add quirk detection based on interface information usb: s3c-hsotg: Add header file protection macros in s3c-hsotg.h USB: ehci-s5p: Add vbus setup function to the s5p ehci glue layer USB: add USB_VENDOR_AND_INTERFACE_INFO() macro USB: notify phy when root hub port connect change USB: remove 8 bytes of padding from usb_host_interface on 64 bit builds USB: option: add ZTE MF821D USB: sierra: QMI mode MC7710 moved to qcserial USB: qcserial: adding Sierra Wireless devices USB: qcserial: support generic Qualcomm serial ports USB: qcserial: make probe more flexible USB: qcserial: centralize probe exit path USB: qcserial: consolidate usb_set_interface calls USB: ehci-s5p: Add support for device tree USB: ohci-exynos: Add support for device tree USB: ehci-omap: fix compile failure(v1) usb: host: tegra: pass correct pointer in ehci_setup() USB: ehci-fsl: Update ifdef check to work on 64-bit ppc USB: serial: keyspan: Removed unrequired parentheses. ...
Diffstat (limited to 'drivers/usb/core/sysfs.c')
-rw-r--r--drivers/usb/core/sysfs.c15
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}
254static DEVICE_ATTR(removable, S_IRUGO, show_removable, NULL); 254static DEVICE_ATTR(removable, S_IRUGO, show_removable, NULL);
255 255
256static ssize_t
257show_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}
263static DEVICE_ATTR(ltm_capable, S_IRUGO, show_ltm_capable, NULL);
264
256#ifdef CONFIG_PM 265#ifdef CONFIG_PM
257 266
258static ssize_t 267static 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};
654static struct attribute_group dev_attr_grp = { 664static 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}
854static DEVICE_ATTR(modalias, S_IRUGO, show_modalias, NULL); 865static DEVICE_ATTR(modalias, S_IRUGO, show_modalias, NULL);
855 866