diff options
author | Rikard Falkeborn <rikard.falkeborn@gmail.com> | 2022-02-10 21:28:05 +0100 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2022-02-18 16:21:09 +1100 |
commit | bd75b4ef4977f567c7a567cf8f48dc122a097aa9 (patch) | |
tree | 2cbdc2ac089b523f80146366def66ced61357d24 /drivers/crypto/nx | |
parent | 83b5a23b6604028ef635a72465b23a85a425b695 (diff) | |
download | linux-bd75b4ef4977f567c7a567cf8f48dc122a097aa9.tar.gz linux-bd75b4ef4977f567c7a567cf8f48dc122a097aa9.tar.bz2 linux-bd75b4ef4977f567c7a567cf8f48dc122a097aa9.zip |
crypto: nx - Constify static attribute_group structs
The only usage of these is to pass their address to
sysfs_{create,remove}_group(), which takes pointers to const struct
attribute_group. Make them const to allow the compiler to put them in
read-only memory.
Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Reviewed-by: Daniel Axtens <dja@axtens.net>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/nx')
-rw-r--r-- | drivers/crypto/nx/nx-common-pseries.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/crypto/nx/nx-common-pseries.c b/drivers/crypto/nx/nx-common-pseries.c index 4e304f6081e4..7584a34ba88c 100644 --- a/drivers/crypto/nx/nx-common-pseries.c +++ b/drivers/crypto/nx/nx-common-pseries.c @@ -962,7 +962,7 @@ static struct attribute *nx842_sysfs_entries[] = { NULL, }; -static struct attribute_group nx842_attribute_group = { +static const struct attribute_group nx842_attribute_group = { .name = NULL, /* put in device directory */ .attrs = nx842_sysfs_entries, }; @@ -992,7 +992,7 @@ static struct attribute *nxcop_caps_sysfs_entries[] = { NULL, }; -static struct attribute_group nxcop_caps_attr_group = { +static const struct attribute_group nxcop_caps_attr_group = { .name = "nx_gzip_caps", .attrs = nxcop_caps_sysfs_entries, }; |