File tree 2 files changed +3
-3
lines changed 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -275,7 +275,7 @@ extern typeof(name) __mod_device_table__##type##__##name \
275
275
#else
276
276
#define MODULE_VERSION (_version ) \
277
277
MODULE_INFO(version, _version); \
278
- static struct module_version_attribute __modver_attr \
278
+ static const struct module_version_attribute __modver_attr \
279
279
__used __section("__modver") \
280
280
__aligned(__alignof__(struct module_version_attribute)) \
281
281
= { \
Original file line number Diff line number Diff line change @@ -860,8 +860,8 @@ static void __init param_sysfs_builtin(void)
860
860
ssize_t __modver_version_show (struct module_attribute * mattr ,
861
861
struct module_kobject * mk , char * buf )
862
862
{
863
- struct module_version_attribute * vattr =
864
- container_of (mattr , struct module_version_attribute , mattr );
863
+ const struct module_version_attribute * vattr =
864
+ container_of_const (mattr , struct module_version_attribute , mattr );
865
865
866
866
return scnprintf (buf , PAGE_SIZE , "%s\n" , vattr -> version );
867
867
}
You can’t perform that action at this time.
0 commit comments