Skip to content

Commit

Permalink
usb: common: ulpi: Constify static attribute_group struct
Browse files Browse the repository at this point in the history
It is never modified, so make them const to allow the compiler to
put it in read-only memory. Done with the help of coccinelle.

Signed-off-by: Rikard Falkeborn <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
rikardfalkeborn authored and gregkh committed Nov 26, 2020
1 parent 690756a commit 52170e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/usb/common/ulpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ static struct attribute *ulpi_dev_attrs[] = {
NULL
};

static struct attribute_group ulpi_dev_attr_group = {
static const struct attribute_group ulpi_dev_attr_group = {
.attrs = ulpi_dev_attrs,
};

Expand Down

0 comments on commit 52170e9

Please sign in to comment.