@@ -156,7 +156,7 @@ static ssize_t isku_sysfs_write(struct file *fp, struct kobject *kobj,
156156
157157#define ISKU_SYSFS_W (thingy , THINGY ) \
158158static 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, \
160160 loff_t off, size_t count) \
161161{ \
162162 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
165165
166166#define ISKU_SYSFS_R (thingy , THINGY ) \
167167static 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, \
169169 loff_t off, size_t count) \
170170{ \
171171 return isku_sysfs_read(fp, kobj, buf, off, count, \
@@ -178,27 +178,27 @@ ISKU_SYSFS_W(thingy, THINGY)
178178
179179#define ISKU_BIN_ATTR_RW (thingy , THINGY ) \
180180ISKU_SYSFS_RW(thingy, THINGY); \
181- static struct bin_attribute bin_attr_##thingy = { \
181+ static const struct bin_attribute bin_attr_##thingy = { \
182182 .attr = { .name = #thingy, .mode = 0660 }, \
183183 .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 \
186186}
187187
188188#define ISKU_BIN_ATTR_R (thingy , THINGY ) \
189189ISKU_SYSFS_R(thingy, THINGY); \
190- static struct bin_attribute bin_attr_##thingy = { \
190+ static const struct bin_attribute bin_attr_##thingy = { \
191191 .attr = { .name = #thingy, .mode = 0440 }, \
192192 .size = ISKU_SIZE_ ## THINGY, \
193- .read = isku_sysfs_read_ ## thingy, \
193+ .read_new = isku_sysfs_read_ ## thingy, \
194194}
195195
196196#define ISKU_BIN_ATTR_W (thingy , THINGY ) \
197197ISKU_SYSFS_W(thingy, THINGY); \
198- static struct bin_attribute bin_attr_##thingy = { \
198+ static const struct bin_attribute bin_attr_##thingy = { \
199199 .attr = { .name = #thingy, .mode = 0220 }, \
200200 .size = ISKU_SIZE_ ## THINGY, \
201- .write = isku_sysfs_write_ ## thingy \
201+ .write_new = isku_sysfs_write_ ## thingy \
202202}
203203
204204ISKU_BIN_ATTR_RW (macro , MACRO );
@@ -217,7 +217,7 @@ ISKU_BIN_ATTR_W(control, CONTROL);
217217ISKU_BIN_ATTR_W (reset , RESET );
218218ISKU_BIN_ATTR_R (info , INFO );
219219
220- static struct bin_attribute * isku_bin_attributes [] = {
220+ static const struct bin_attribute * const isku_bin_attributes [] = {
221221 & bin_attr_macro ,
222222 & bin_attr_keys_function ,
223223 & bin_attr_keys_easyzone ,
@@ -238,7 +238,7 @@ static struct bin_attribute *isku_bin_attributes[] = {
238238
239239static const struct attribute_group isku_group = {
240240 .attrs = isku_attrs ,
241- .bin_attrs = isku_bin_attributes ,
241+ .bin_attrs_new = isku_bin_attributes ,
242242};
243243
244244static const struct attribute_group * isku_groups [] = {
0 commit comments