From f2d13b02cd9647518b4397fc23fed971955ec945 Mon Sep 17 00:00:00 2001 From: Lu Baolu Date: Fri, 13 Oct 2017 15:09:50 +0800 Subject: usb: Apply hardware LPM attributes to 3.1 device The devices running at SuperSpeedPlus speed are also LPM capable. Apply usb3 hardware LPM attributes to those devices as well. Signed-off-by: Lu Baolu Signed-off-by: Greg Kroah-Hartman --- drivers/usb/core/sysfs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers/usb/core/sysfs.c') diff --git a/drivers/usb/core/sysfs.c b/drivers/usb/core/sysfs.c index d930bfda4010..fa5d47da36d2 100644 --- a/drivers/usb/core/sysfs.c +++ b/drivers/usb/core/sysfs.c @@ -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); -- cgit v1.2.3-59-g8ed1b From aa1f3bb56761cf627ed53a40607bead16d6e23bc Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Fri, 3 Nov 2017 09:18:41 +0100 Subject: USB: core: move existing SPDX tags to top of the file To match the rest of the kernel, the SPDX tags for the drivers/usb/core/ files are moved to the first line of the file. This makes it more obvious the tag is present as well as making it match the other 12k files in the tree with this location. It also uses // to match the "expected style" as well. Signed-off-by: Greg Kroah-Hartman --- drivers/usb/core/buffer.c | 2 +- drivers/usb/core/config.c | 2 +- drivers/usb/core/driver.c | 2 +- drivers/usb/core/endpoint.c | 2 +- drivers/usb/core/file.c | 2 +- drivers/usb/core/generic.c | 2 +- drivers/usb/core/hub.c | 2 +- drivers/usb/core/message.c | 2 +- drivers/usb/core/notify.c | 2 +- drivers/usb/core/sysfs.c | 2 +- drivers/usb/core/urb.c | 2 +- drivers/usb/core/usb.c | 2 +- drivers/usb/core/usb.h | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) (limited to 'drivers/usb/core/sysfs.c') diff --git a/drivers/usb/core/buffer.c b/drivers/usb/core/buffer.c index b64568cf572c..77eef8acff94 100644 --- a/drivers/usb/core/buffer.c +++ b/drivers/usb/core/buffer.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 /* * DMA memory management for framework level HCD code (hc_driver) * @@ -5,7 +6,6 @@ * and should work with all USB controllers, regardless of bus type. * * Released under the GPLv2 only. - * SPDX-License-Identifier: GPL-2.0 */ #include diff --git a/drivers/usb/core/config.c b/drivers/usb/core/config.c index 883549ee946c..da8acd980fc6 100644 --- a/drivers/usb/core/config.c +++ b/drivers/usb/core/config.c @@ -1,6 +1,6 @@ +// SPDX-License-Identifier: GPL-2.0 /* * Released under the GPLv2 only. - * SPDX-License-Identifier: GPL-2.0 */ #include diff --git a/drivers/usb/core/driver.c b/drivers/usb/core/driver.c index 353993f983c8..4b941a3a746e 100644 --- a/drivers/usb/core/driver.c +++ b/drivers/usb/core/driver.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 /* * drivers/usb/driver.c - most of the driver model stuff for usb * @@ -16,7 +17,6 @@ * (C) Copyright Greg Kroah-Hartman 2002-2003 * * Released under the GPLv2 only. - * SPDX-License-Identifier: GPL-2.0 * * NOTE! This is not actually a driver at all, rather this is * just a collection of helper routines that implement the diff --git a/drivers/usb/core/endpoint.c b/drivers/usb/core/endpoint.c index a60bc830a056..1c2c04079676 100644 --- a/drivers/usb/core/endpoint.c +++ b/drivers/usb/core/endpoint.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 /* * drivers/usb/core/endpoint.c * @@ -6,7 +7,6 @@ * (C) Copyright 2006 Novell Inc. * * Released under the GPLv2 only. - * SPDX-License-Identifier: GPL-2.0 * * Endpoint sysfs stuff */ diff --git a/drivers/usb/core/file.c b/drivers/usb/core/file.c index 87ad6b6bfee8..65de6f73b672 100644 --- a/drivers/usb/core/file.c +++ b/drivers/usb/core/file.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 /* * drivers/usb/core/file.c * @@ -14,7 +15,6 @@ * (C) Copyright Greg Kroah-Hartman 2002-2003 * * Released under the GPLv2 only. - * SPDX-License-Identifier: GPL-2.0 */ #include diff --git a/drivers/usb/core/generic.c b/drivers/usb/core/generic.c index bd3e0c5a6db2..83c14dda6300 100644 --- a/drivers/usb/core/generic.c +++ b/drivers/usb/core/generic.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 /* * drivers/usb/generic.c - generic driver for USB devices (not interfaces) * @@ -16,7 +17,6 @@ * (C) Copyright Greg Kroah-Hartman 2002-2003 * * Released under the GPLv2 only. - * SPDX-License-Identifier: GPL-2.0 */ #include diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index 196a0a5540ed..3edcaf105692 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 /* * USB hub driver. * @@ -7,7 +8,6 @@ * (C) Copyright 2001 Brad Hards (bhards@bigpond.net.au) * * Released under the GPLv2 only. - * SPDX-License-Identifier: GPL-2.0 */ #include diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c index 371a07d874a3..5e8379b42f47 100644 --- a/drivers/usb/core/message.c +++ b/drivers/usb/core/message.c @@ -1,8 +1,8 @@ +// SPDX-License-Identifier: GPL-2.0 /* * message.c - synchronous message handling * * Released under the GPLv2 only. - * SPDX-License-Identifier: GPL-2.0 */ #include /* for scatterlist macros */ diff --git a/drivers/usb/core/notify.c b/drivers/usb/core/notify.c index b12a463a3e22..ab474b11523e 100644 --- a/drivers/usb/core/notify.c +++ b/drivers/usb/core/notify.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 /* * All the USB notify logic * @@ -7,7 +8,6 @@ * but fixed up to not be so broken. * * Released under the GPLv2 only. - * SPDX-License-Identifier: GPL-2.0 */ diff --git a/drivers/usb/core/sysfs.c b/drivers/usb/core/sysfs.c index fa5d47da36d2..3f1222ed98f8 100644 --- a/drivers/usb/core/sysfs.c +++ b/drivers/usb/core/sysfs.c @@ -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 */ diff --git a/drivers/usb/core/urb.c b/drivers/usb/core/urb.c index caca5ed6d0f3..f501af0b3079 100644 --- a/drivers/usb/core/urb.c +++ b/drivers/usb/core/urb.c @@ -1,6 +1,6 @@ +// SPDX-License-Identifier: GPL-2.0 /* * Released under the GPLv2 only. - * SPDX-License-Identifier: GPL-2.0 */ #include diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c index 17681d5638ac..845286f08ab0 100644 --- a/drivers/usb/core/usb.c +++ b/drivers/usb/core/usb.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 /* * drivers/usb/core/usb.c * @@ -13,7 +14,6 @@ * (C) Copyright Greg Kroah-Hartman 2002-2003 * * Released under the GPLv2 only. - * SPDX-License-Identifier: GPL-2.0 * * NOTE! This is not actually a driver at all, rather this is * just a collection of helper routines that implement the diff --git a/drivers/usb/core/usb.h b/drivers/usb/core/usb.h index f71890a2db4e..2bee08d084ae 100644 --- a/drivers/usb/core/usb.h +++ b/drivers/usb/core/usb.h @@ -1,6 +1,6 @@ +// SPDX-License-Identifier: GPL-2.0 /* * Released under the GPLv2 only. - * SPDX-License-Identifier: GPL-2.0 */ #include -- cgit v1.2.3-59-g8ed1b