summaryrefslogtreecommitdiff
path: root/drivers/usb/core/port.c
diff options
context:
space:
mode:
authorRikard Falkeborn <rikard.falkeborn@gmail.com>2020-11-25 17:24:58 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-11-26 13:40:42 +0100
commit4154a4f70a9488212f8731770e10eae957d33da9 (patch)
tree4cd6f87dead07b766b15f5e61705a90860e9a625 /drivers/usb/core/port.c
parent11e5e568ceed7c8c570313a14fa96c72f21dad31 (diff)
USB: core: Constify static attribute_group structs
These are never modified, so make them const to allow the compiler to put them in read-only memory. Done with the help of coccinelle. Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com> Link: https://lore.kernel.org/r/20201125162500.37228-2-rikard.falkeborn@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/core/port.c')
-rw-r--r--drivers/usb/core/port.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/core/port.c b/drivers/usb/core/port.c
index 235a7c645503..dfcca9c876c7 100644
--- a/drivers/usb/core/port.c
+++ b/drivers/usb/core/port.c
@@ -155,7 +155,7 @@ static struct attribute *port_dev_attrs[] = {
NULL,
};
-static struct attribute_group port_dev_attr_grp = {
+static const struct attribute_group port_dev_attr_grp = {
.attrs = port_dev_attrs,
};
@@ -169,7 +169,7 @@ static struct attribute *port_dev_usb3_attrs[] = {
NULL,
};
-static struct attribute_group port_dev_usb3_attr_grp = {
+static const struct attribute_group port_dev_usb3_attr_grp = {
.attrs = port_dev_usb3_attrs,
};