Skip to content

Commit

Permalink
crypto: omap-sham - Constify static attribute_group
Browse files Browse the repository at this point in the history
The only usage of omap_sham_attr_group is to pass its address to
sysfs_{create,remove}_group(), which takes pointers to const struct
attribute_group. Make it const to allow the compiler to put it in
read-only memory.

Signed-off-by: Rikard Falkeborn <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
  • Loading branch information
rikardfalkeborn authored and herbertx committed Feb 18, 2022
1 parent 882f6c6 commit 83b5a23
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/crypto/omap-sham.c
Original file line number Diff line number Diff line change
Expand Up @@ -2045,7 +2045,7 @@ static struct attribute *omap_sham_attrs[] = {
NULL,
};

static struct attribute_group omap_sham_attr_group = {
static const struct attribute_group omap_sham_attr_group = {
.attrs = omap_sham_attrs,
};

Expand Down

0 comments on commit 83b5a23

Please sign in to comment.