]> git.proxmox.com Git - mirror_ubuntu-kernels.git/blobdiff - drivers/usb/core/sysfs.c
Merge tag 'usb-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
[mirror_ubuntu-kernels.git] / drivers / usb / core / sysfs.c
index d930bfda40101457dad980ec432c0b73d7193981..27bb340430536ba517529f1a07974a3f49c55169 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * drivers/usb/core/sysfs.c
  *
@@ -8,7 +9,6 @@
  * All of the sysfs file attributes for usb devices and interfaces.
  *
  * Released under the GPLv2 only.
- * SPDX-License-Identifier: GPL-2.0
  */
 
 
@@ -654,7 +654,8 @@ static int add_power_attributes(struct device *dev)
                if (udev->usb2_hw_lpm_capable == 1)
                        rc = sysfs_merge_group(&dev->kobj,
                                        &usb2_hardware_lpm_attr_group);
-               if (udev->speed == USB_SPEED_SUPER &&
+               if ((udev->speed == USB_SPEED_SUPER ||
+                    udev->speed == USB_SPEED_SUPER_PLUS) &&
                                udev->lpm_capable == 1)
                        rc = sysfs_merge_group(&dev->kobj,
                                        &usb3_hardware_lpm_attr_group);
@@ -973,7 +974,7 @@ static ssize_t interface_show(struct device *dev, struct device_attribute *attr,
        char *string;
 
        intf = to_usb_interface(dev);
-       string = ACCESS_ONCE(intf->cur_altsetting->string);
+       string = READ_ONCE(intf->cur_altsetting->string);
        if (!string)
                return 0;
        return sprintf(buf, "%s\n", string);
@@ -989,7 +990,7 @@ static ssize_t modalias_show(struct device *dev, struct device_attribute *attr,
 
        intf = to_usb_interface(dev);
        udev = interface_to_usbdev(intf);
-       alt = ACCESS_ONCE(intf->cur_altsetting);
+       alt = READ_ONCE(intf->cur_altsetting);
 
        return sprintf(buf, "usb:v%04Xp%04Xd%04Xdc%02Xdsc%02Xdp%02X"
                        "ic%02Xisc%02Xip%02Xin%02X\n",