@@ -156,7 +156,7 @@ static ssize_t isku_sysfs_write(struct file *fp, struct kobject *kobj,
156
156
157
157
#define ISKU_SYSFS_W (thingy , THINGY ) \
158
158
static ssize_t isku_sysfs_write_ ## thingy(struct file *fp, struct kobject *kobj, \
159
- struct bin_attribute *attr, char *buf, \
159
+ const struct bin_attribute *attr, char *buf, \
160
160
loff_t off, size_t count) \
161
161
{ \
162
162
return isku_sysfs_write(fp, kobj, buf, off, count, \
@@ -165,7 +165,7 @@ static ssize_t isku_sysfs_write_ ## thingy(struct file *fp, struct kobject *kobj
165
165
166
166
#define ISKU_SYSFS_R (thingy , THINGY ) \
167
167
static ssize_t isku_sysfs_read_ ## thingy(struct file *fp, struct kobject *kobj, \
168
- struct bin_attribute *attr, char *buf, \
168
+ const struct bin_attribute *attr, char *buf, \
169
169
loff_t off, size_t count) \
170
170
{ \
171
171
return isku_sysfs_read(fp, kobj, buf, off, count, \
@@ -178,27 +178,27 @@ ISKU_SYSFS_W(thingy, THINGY)
178
178
179
179
#define ISKU_BIN_ATTR_RW (thingy , THINGY ) \
180
180
ISKU_SYSFS_RW(thingy, THINGY); \
181
- static struct bin_attribute bin_attr_##thingy = { \
181
+ static const struct bin_attribute bin_attr_##thingy = { \
182
182
.attr = { .name = #thingy, .mode = 0660 }, \
183
183
.size = ISKU_SIZE_ ## THINGY, \
184
- .read = isku_sysfs_read_ ## thingy, \
185
- .write = isku_sysfs_write_ ## thingy \
184
+ .read_new = isku_sysfs_read_ ## thingy, \
185
+ .write_new = isku_sysfs_write_ ## thingy \
186
186
}
187
187
188
188
#define ISKU_BIN_ATTR_R (thingy , THINGY ) \
189
189
ISKU_SYSFS_R(thingy, THINGY); \
190
- static struct bin_attribute bin_attr_##thingy = { \
190
+ static const struct bin_attribute bin_attr_##thingy = { \
191
191
.attr = { .name = #thingy, .mode = 0440 }, \
192
192
.size = ISKU_SIZE_ ## THINGY, \
193
- .read = isku_sysfs_read_ ## thingy, \
193
+ .read_new = isku_sysfs_read_ ## thingy, \
194
194
}
195
195
196
196
#define ISKU_BIN_ATTR_W (thingy , THINGY ) \
197
197
ISKU_SYSFS_W(thingy, THINGY); \
198
- static struct bin_attribute bin_attr_##thingy = { \
198
+ static const struct bin_attribute bin_attr_##thingy = { \
199
199
.attr = { .name = #thingy, .mode = 0220 }, \
200
200
.size = ISKU_SIZE_ ## THINGY, \
201
- .write = isku_sysfs_write_ ## thingy \
201
+ .write_new = isku_sysfs_write_ ## thingy \
202
202
}
203
203
204
204
ISKU_BIN_ATTR_RW (macro , MACRO );
@@ -217,7 +217,7 @@ ISKU_BIN_ATTR_W(control, CONTROL);
217
217
ISKU_BIN_ATTR_W (reset , RESET );
218
218
ISKU_BIN_ATTR_R (info , INFO );
219
219
220
- static struct bin_attribute * isku_bin_attributes [] = {
220
+ static const struct bin_attribute * const isku_bin_attributes [] = {
221
221
& bin_attr_macro ,
222
222
& bin_attr_keys_function ,
223
223
& bin_attr_keys_easyzone ,
@@ -238,7 +238,7 @@ static struct bin_attribute *isku_bin_attributes[] = {
238
238
239
239
static const struct attribute_group isku_group = {
240
240
.attrs = isku_attrs ,
241
- .bin_attrs = isku_bin_attributes ,
241
+ .bin_attrs_new = isku_bin_attributes ,
242
242
};
243
243
244
244
static const struct attribute_group * isku_groups [] = {
0 commit comments