@@ -66,7 +66,7 @@ static struct esas2r_adapter *esas2r_adapter_from_kobj(struct kobject *kobj)
66
66
}
67
67
68
68
static ssize_t read_fw (struct file * file , struct kobject * kobj ,
69
- struct bin_attribute * attr ,
69
+ const struct bin_attribute * attr ,
70
70
char * buf , loff_t off , size_t count )
71
71
{
72
72
struct esas2r_adapter * a = esas2r_adapter_from_kobj (kobj );
@@ -75,7 +75,7 @@ static ssize_t read_fw(struct file *file, struct kobject *kobj,
75
75
}
76
76
77
77
static ssize_t write_fw (struct file * file , struct kobject * kobj ,
78
- struct bin_attribute * attr ,
78
+ const struct bin_attribute * attr ,
79
79
char * buf , loff_t off , size_t count )
80
80
{
81
81
struct esas2r_adapter * a = esas2r_adapter_from_kobj (kobj );
@@ -84,7 +84,7 @@ static ssize_t write_fw(struct file *file, struct kobject *kobj,
84
84
}
85
85
86
86
static ssize_t read_fs (struct file * file , struct kobject * kobj ,
87
- struct bin_attribute * attr ,
87
+ const struct bin_attribute * attr ,
88
88
char * buf , loff_t off , size_t count )
89
89
{
90
90
struct esas2r_adapter * a = esas2r_adapter_from_kobj (kobj );
@@ -93,7 +93,7 @@ static ssize_t read_fs(struct file *file, struct kobject *kobj,
93
93
}
94
94
95
95
static ssize_t write_fs (struct file * file , struct kobject * kobj ,
96
- struct bin_attribute * attr ,
96
+ const struct bin_attribute * attr ,
97
97
char * buf , loff_t off , size_t count )
98
98
{
99
99
struct esas2r_adapter * a = esas2r_adapter_from_kobj (kobj );
@@ -109,7 +109,7 @@ static ssize_t write_fs(struct file *file, struct kobject *kobj,
109
109
}
110
110
111
111
static ssize_t read_vda (struct file * file , struct kobject * kobj ,
112
- struct bin_attribute * attr ,
112
+ const struct bin_attribute * attr ,
113
113
char * buf , loff_t off , size_t count )
114
114
{
115
115
struct esas2r_adapter * a = esas2r_adapter_from_kobj (kobj );
@@ -118,7 +118,7 @@ static ssize_t read_vda(struct file *file, struct kobject *kobj,
118
118
}
119
119
120
120
static ssize_t write_vda (struct file * file , struct kobject * kobj ,
121
- struct bin_attribute * attr ,
121
+ const struct bin_attribute * attr ,
122
122
char * buf , loff_t off , size_t count )
123
123
{
124
124
struct esas2r_adapter * a = esas2r_adapter_from_kobj (kobj );
@@ -127,7 +127,7 @@ static ssize_t write_vda(struct file *file, struct kobject *kobj,
127
127
}
128
128
129
129
static ssize_t read_live_nvram (struct file * file , struct kobject * kobj ,
130
- struct bin_attribute * attr ,
130
+ const struct bin_attribute * attr ,
131
131
char * buf , loff_t off , size_t count )
132
132
{
133
133
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,
138
138
}
139
139
140
140
static ssize_t write_live_nvram (struct file * file , struct kobject * kobj ,
141
- struct bin_attribute * attr ,
141
+ const struct bin_attribute * attr ,
142
142
char * buf , loff_t off , size_t count )
143
143
{
144
144
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,
158
158
}
159
159
160
160
static ssize_t read_default_nvram (struct file * file , struct kobject * kobj ,
161
- struct bin_attribute * attr ,
161
+ const struct bin_attribute * attr ,
162
162
char * buf , loff_t off , size_t count )
163
163
{
164
164
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,
169
169
}
170
170
171
171
static ssize_t read_hw (struct file * file , struct kobject * kobj ,
172
- struct bin_attribute * attr ,
172
+ const struct bin_attribute * attr ,
173
173
char * buf , loff_t off , size_t count )
174
174
{
175
175
struct esas2r_adapter * a = esas2r_adapter_from_kobj (kobj );
@@ -187,7 +187,7 @@ static ssize_t read_hw(struct file *file, struct kobject *kobj,
187
187
}
188
188
189
189
static ssize_t write_hw (struct file * file , struct kobject * kobj ,
190
- struct bin_attribute * attr ,
190
+ const struct bin_attribute * attr ,
191
191
char * buf , loff_t off , size_t count )
192
192
{
193
193
struct esas2r_adapter * a = esas2r_adapter_from_kobj (kobj );
@@ -211,23 +211,23 @@ static ssize_t write_hw(struct file *file, struct kobject *kobj,
211
211
}
212
212
213
213
#define ESAS2R_RW_BIN_ATTR (_name ) \
214
- struct bin_attribute bin_attr_ ## _name = { \
214
+ const struct bin_attribute bin_attr_ ## _name = { \
215
215
.attr = \
216
216
{ .name = __stringify(_name), .mode = S_IRUSR | S_IWUSR }, \
217
217
.size = 0, \
218
- .read = read_ ## _name, \
219
- .write = write_ ## _name }
218
+ .read_new = read_ ## _name, \
219
+ .write_new = write_ ## _name }
220
220
221
221
ESAS2R_RW_BIN_ATTR (fw );
222
222
ESAS2R_RW_BIN_ATTR (fs );
223
223
ESAS2R_RW_BIN_ATTR (vda );
224
224
ESAS2R_RW_BIN_ATTR (hw );
225
225
ESAS2R_RW_BIN_ATTR (live_nvram );
226
226
227
- struct bin_attribute bin_attr_default_nvram = {
227
+ const struct bin_attribute bin_attr_default_nvram = {
228
228
.attr = { .name = "default_nvram" , .mode = S_IRUGO },
229
229
.size = 0 ,
230
- .read = read_default_nvram ,
230
+ .read_new = read_default_nvram ,
231
231
.write = NULL
232
232
};
233
233
0 commit comments