@@ -46,17 +46,17 @@ ssize_t roccat_common2_sysfs_write(struct file *fp, struct kobject *kobj,
4646
4747#define ROCCAT_COMMON2_SYSFS_W (thingy , COMMAND , SIZE ) \
4848static ssize_t roccat_common2_sysfs_write_ ## thingy(struct file *fp, \
49- struct kobject *kobj, struct bin_attribute *attr, char *buf , \
50- loff_t off, size_t count) \
49+ struct kobject *kobj, const struct bin_attribute *attr, \
50+ char *buf, loff_t off, size_t count) \
5151{ \
5252 return roccat_common2_sysfs_write(fp, kobj, buf, off, count, \
5353 SIZE, COMMAND); \
5454}
5555
5656#define ROCCAT_COMMON2_SYSFS_R (thingy , COMMAND , SIZE ) \
5757static ssize_t roccat_common2_sysfs_read_ ## thingy(struct file *fp, \
58- struct kobject *kobj, struct bin_attribute *attr, char *buf , \
59- loff_t off, size_t count) \
58+ struct kobject *kobj, const struct bin_attribute *attr, \
59+ char *buf, loff_t off, size_t count) \
6060{ \
6161 return roccat_common2_sysfs_read(fp, kobj, buf, off, count, \
6262 SIZE, COMMAND); \
@@ -68,27 +68,27 @@ ROCCAT_COMMON2_SYSFS_R(thingy, COMMAND, SIZE)
6868
6969#define ROCCAT_COMMON2_BIN_ATTRIBUTE_RW (thingy , COMMAND , SIZE ) \
7070ROCCAT_COMMON2_SYSFS_RW(thingy, COMMAND, SIZE); \
71- static struct bin_attribute bin_attr_ ## thingy = { \
71+ static const struct bin_attribute bin_attr_ ## thingy = { \
7272 .attr = { .name = #thingy, .mode = 0660 }, \
7373 .size = SIZE, \
74- .read = roccat_common2_sysfs_read_ ## thingy, \
75- .write = roccat_common2_sysfs_write_ ## thingy \
74+ .read_new = roccat_common2_sysfs_read_ ## thingy, \
75+ .write_new = roccat_common2_sysfs_write_ ## thingy \
7676}
7777
7878#define ROCCAT_COMMON2_BIN_ATTRIBUTE_R (thingy , COMMAND , SIZE ) \
7979ROCCAT_COMMON2_SYSFS_R(thingy, COMMAND, SIZE); \
80- static struct bin_attribute bin_attr_ ## thingy = { \
80+ static const struct bin_attribute bin_attr_ ## thingy = { \
8181 .attr = { .name = #thingy, .mode = 0440 }, \
8282 .size = SIZE, \
83- .read = roccat_common2_sysfs_read_ ## thingy, \
83+ .read_new = roccat_common2_sysfs_read_ ## thingy, \
8484}
8585
8686#define ROCCAT_COMMON2_BIN_ATTRIBUTE_W (thingy , COMMAND , SIZE ) \
8787ROCCAT_COMMON2_SYSFS_W(thingy, COMMAND, SIZE); \
88- static struct bin_attribute bin_attr_ ## thingy = { \
88+ static const struct bin_attribute bin_attr_ ## thingy = { \
8989 .attr = { .name = #thingy, .mode = 0220 }, \
9090 .size = SIZE, \
91- .write = roccat_common2_sysfs_write_ ## thingy \
91+ .write_new = roccat_common2_sysfs_write_ ## thingy \
9292}
9393
9494#endif
0 commit comments