@@ -30,7 +30,7 @@ static struct cbmem_entry *to_cbmem_entry(struct kobject *kobj)
30
30
}
31
31
32
32
static ssize_t mem_read (struct file * filp , struct kobject * kobj ,
33
- struct bin_attribute * bin_attr , char * buf , loff_t pos ,
33
+ const struct bin_attribute * bin_attr , char * buf , loff_t pos ,
34
34
size_t count )
35
35
{
36
36
struct cbmem_entry * entry = to_cbmem_entry (kobj );
@@ -40,7 +40,7 @@ static ssize_t mem_read(struct file *filp, struct kobject *kobj,
40
40
}
41
41
42
42
static ssize_t mem_write (struct file * filp , struct kobject * kobj ,
43
- struct bin_attribute * bin_attr , char * buf , loff_t pos ,
43
+ const struct bin_attribute * bin_attr , char * buf , loff_t pos ,
44
44
size_t count )
45
45
{
46
46
struct cbmem_entry * entry = to_cbmem_entry (kobj );
@@ -53,7 +53,7 @@ static ssize_t mem_write(struct file *filp, struct kobject *kobj,
53
53
memcpy (entry -> mem_file_buf + pos , buf , count );
54
54
return count ;
55
55
}
56
- static BIN_ATTR_ADMIN_RW (mem , 0 ) ;
56
+ static const BIN_ATTR_ADMIN_RW (mem , 0 ) ;
57
57
58
58
static ssize_t address_show (struct device * dev , struct device_attribute * attr ,
59
59
char * buf )
@@ -79,14 +79,14 @@ static struct attribute *attrs[] = {
79
79
NULL ,
80
80
};
81
81
82
- static struct bin_attribute * bin_attrs [] = {
82
+ static const struct bin_attribute * const bin_attrs [] = {
83
83
& bin_attr_mem ,
84
84
NULL ,
85
85
};
86
86
87
87
static const struct attribute_group cbmem_entry_group = {
88
88
.attrs = attrs ,
89
- .bin_attrs = bin_attrs ,
89
+ .bin_attrs_new = bin_attrs ,
90
90
};
91
91
92
92
static const struct attribute_group * dev_groups [] = {
0 commit comments