File tree 1 file changed +3
-3
lines changed 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -555,13 +555,13 @@ struct module_param_attrs
555
555
};
556
556
557
557
#ifdef CONFIG_SYSFS
558
- #define to_param_attr (n ) container_of (n, struct param_attribute, mattr)
558
+ #define to_param_attr (n ) container_of_const (n, struct param_attribute, mattr)
559
559
560
560
static ssize_t param_attr_show (struct module_attribute * mattr ,
561
561
struct module_kobject * mk , char * buf )
562
562
{
563
563
int count ;
564
- struct param_attribute * attribute = to_param_attr (mattr );
564
+ const struct param_attribute * attribute = to_param_attr (mattr );
565
565
566
566
if (!attribute -> param -> ops -> get )
567
567
return - EPERM ;
@@ -578,7 +578,7 @@ static ssize_t param_attr_store(struct module_attribute *mattr,
578
578
const char * buf , size_t len )
579
579
{
580
580
int err ;
581
- struct param_attribute * attribute = to_param_attr (mattr );
581
+ const struct param_attribute * attribute = to_param_attr (mattr );
582
582
583
583
if (!attribute -> param -> ops -> set )
584
584
return - EPERM ;
You can’t perform that action at this time.
0 commit comments