@@ -66,7 +66,7 @@ static struct esas2r_adapter *esas2r_adapter_from_kobj(struct kobject *kobj)
6666}
6767
6868static ssize_t read_fw (struct file * file , struct kobject * kobj ,
69- struct bin_attribute * attr ,
69+ const struct bin_attribute * attr ,
7070 char * buf , loff_t off , size_t count )
7171{
7272 struct esas2r_adapter * a = esas2r_adapter_from_kobj (kobj );
@@ -75,7 +75,7 @@ static ssize_t read_fw(struct file *file, struct kobject *kobj,
7575}
7676
7777static ssize_t write_fw (struct file * file , struct kobject * kobj ,
78- struct bin_attribute * attr ,
78+ const struct bin_attribute * attr ,
7979 char * buf , loff_t off , size_t count )
8080{
8181 struct esas2r_adapter * a = esas2r_adapter_from_kobj (kobj );
@@ -84,7 +84,7 @@ static ssize_t write_fw(struct file *file, struct kobject *kobj,
8484}
8585
8686static ssize_t read_fs (struct file * file , struct kobject * kobj ,
87- struct bin_attribute * attr ,
87+ const struct bin_attribute * attr ,
8888 char * buf , loff_t off , size_t count )
8989{
9090 struct esas2r_adapter * a = esas2r_adapter_from_kobj (kobj );
@@ -93,7 +93,7 @@ static ssize_t read_fs(struct file *file, struct kobject *kobj,
9393}
9494
9595static ssize_t write_fs (struct file * file , struct kobject * kobj ,
96- struct bin_attribute * attr ,
96+ const struct bin_attribute * attr ,
9797 char * buf , loff_t off , size_t count )
9898{
9999 struct esas2r_adapter * a = esas2r_adapter_from_kobj (kobj );
@@ -109,7 +109,7 @@ static ssize_t write_fs(struct file *file, struct kobject *kobj,
109109}
110110
111111static ssize_t read_vda (struct file * file , struct kobject * kobj ,
112- struct bin_attribute * attr ,
112+ const struct bin_attribute * attr ,
113113 char * buf , loff_t off , size_t count )
114114{
115115 struct esas2r_adapter * a = esas2r_adapter_from_kobj (kobj );
@@ -118,7 +118,7 @@ static ssize_t read_vda(struct file *file, struct kobject *kobj,
118118}
119119
120120static ssize_t write_vda (struct file * file , struct kobject * kobj ,
121- struct bin_attribute * attr ,
121+ const struct bin_attribute * attr ,
122122 char * buf , loff_t off , size_t count )
123123{
124124 struct esas2r_adapter * a = esas2r_adapter_from_kobj (kobj );
@@ -127,7 +127,7 @@ static ssize_t write_vda(struct file *file, struct kobject *kobj,
127127}
128128
129129static ssize_t read_live_nvram (struct file * file , struct kobject * kobj ,
130- struct bin_attribute * attr ,
130+ const struct bin_attribute * attr ,
131131 char * buf , loff_t off , size_t count )
132132{
133133 struct esas2r_adapter * a = esas2r_adapter_from_kobj (kobj );
@@ -138,7 +138,7 @@ static ssize_t read_live_nvram(struct file *file, struct kobject *kobj,
138138}
139139
140140static ssize_t write_live_nvram (struct file * file , struct kobject * kobj ,
141- struct bin_attribute * attr ,
141+ const struct bin_attribute * attr ,
142142 char * buf , loff_t off , size_t count )
143143{
144144 struct esas2r_adapter * a = esas2r_adapter_from_kobj (kobj );
@@ -158,7 +158,7 @@ static ssize_t write_live_nvram(struct file *file, struct kobject *kobj,
158158}
159159
160160static ssize_t read_default_nvram (struct file * file , struct kobject * kobj ,
161- struct bin_attribute * attr ,
161+ const struct bin_attribute * attr ,
162162 char * buf , loff_t off , size_t count )
163163{
164164 struct esas2r_adapter * a = esas2r_adapter_from_kobj (kobj );
@@ -169,7 +169,7 @@ static ssize_t read_default_nvram(struct file *file, struct kobject *kobj,
169169}
170170
171171static ssize_t read_hw (struct file * file , struct kobject * kobj ,
172- struct bin_attribute * attr ,
172+ const struct bin_attribute * attr ,
173173 char * buf , loff_t off , size_t count )
174174{
175175 struct esas2r_adapter * a = esas2r_adapter_from_kobj (kobj );
@@ -187,7 +187,7 @@ static ssize_t read_hw(struct file *file, struct kobject *kobj,
187187}
188188
189189static ssize_t write_hw (struct file * file , struct kobject * kobj ,
190- struct bin_attribute * attr ,
190+ const struct bin_attribute * attr ,
191191 char * buf , loff_t off , size_t count )
192192{
193193 struct esas2r_adapter * a = esas2r_adapter_from_kobj (kobj );
@@ -211,23 +211,23 @@ static ssize_t write_hw(struct file *file, struct kobject *kobj,
211211}
212212
213213#define ESAS2R_RW_BIN_ATTR (_name ) \
214- struct bin_attribute bin_attr_ ## _name = { \
214+ const struct bin_attribute bin_attr_ ## _name = { \
215215 .attr = \
216216 { .name = __stringify(_name), .mode = S_IRUSR | S_IWUSR }, \
217217 .size = 0, \
218- .read = read_ ## _name, \
219- .write = write_ ## _name }
218+ .read_new = read_ ## _name, \
219+ .write_new = write_ ## _name }
220220
221221ESAS2R_RW_BIN_ATTR (fw );
222222ESAS2R_RW_BIN_ATTR (fs );
223223ESAS2R_RW_BIN_ATTR (vda );
224224ESAS2R_RW_BIN_ATTR (hw );
225225ESAS2R_RW_BIN_ATTR (live_nvram );
226226
227- struct bin_attribute bin_attr_default_nvram = {
227+ const struct bin_attribute bin_attr_default_nvram = {
228228 .attr = { .name = "default_nvram" , .mode = S_IRUGO },
229229 .size = 0 ,
230- .read = read_default_nvram ,
230+ .read_new = read_default_nvram ,
231231 .write = NULL
232232};
233233
0 commit comments