diff options
Diffstat (limited to 'drivers/w1/slaves/w1_ds2408.c')
-rw-r--r-- | drivers/w1/slaves/w1_ds2408.c | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/drivers/w1/slaves/w1_ds2408.c b/drivers/w1/slaves/w1_ds2408.c index 56f822a1dfdb..beccd2912d2a 100644 --- a/drivers/w1/slaves/w1_ds2408.c +++ b/drivers/w1/slaves/w1_ds2408.c @@ -65,8 +65,8 @@ static int _read_reg(struct w1_slave *sl, u8 address, unsigned char *buf) } static ssize_t state_read(struct file *filp, struct kobject *kobj, - struct bin_attribute *bin_attr, char *buf, loff_t off, - size_t count) + const struct bin_attribute *bin_attr, char *buf, + loff_t off, size_t count) { dev_dbg(&kobj_to_w1_slave(kobj)->dev, "Reading %s kobj: %p, off: %0#10x, count: %zu, buff addr: %p", @@ -77,7 +77,7 @@ static ssize_t state_read(struct file *filp, struct kobject *kobj, } static ssize_t output_read(struct file *filp, struct kobject *kobj, - struct bin_attribute *bin_attr, char *buf, + const struct bin_attribute *bin_attr, char *buf, loff_t off, size_t count) { dev_dbg(&kobj_to_w1_slave(kobj)->dev, @@ -90,7 +90,7 @@ static ssize_t output_read(struct file *filp, struct kobject *kobj, } static ssize_t activity_read(struct file *filp, struct kobject *kobj, - struct bin_attribute *bin_attr, char *buf, + const struct bin_attribute *bin_attr, char *buf, loff_t off, size_t count) { dev_dbg(&kobj_to_w1_slave(kobj)->dev, @@ -103,8 +103,8 @@ static ssize_t activity_read(struct file *filp, struct kobject *kobj, } static ssize_t cond_search_mask_read(struct file *filp, struct kobject *kobj, - struct bin_attribute *bin_attr, char *buf, - loff_t off, size_t count) + const struct bin_attribute *bin_attr, + char *buf, loff_t off, size_t count) { dev_dbg(&kobj_to_w1_slave(kobj)->dev, "Reading %s kobj: %p, off: %0#10x, count: %zu, buff addr: %p", @@ -117,7 +117,7 @@ static ssize_t cond_search_mask_read(struct file *filp, struct kobject *kobj, static ssize_t cond_search_polarity_read(struct file *filp, struct kobject *kobj, - struct bin_attribute *bin_attr, + const struct bin_attribute *bin_attr, char *buf, loff_t off, size_t count) { if (count != 1 || off != 0) @@ -127,8 +127,8 @@ static ssize_t cond_search_polarity_read(struct file *filp, } static ssize_t status_control_read(struct file *filp, struct kobject *kobj, - struct bin_attribute *bin_attr, char *buf, - loff_t off, size_t count) + const struct bin_attribute *bin_attr, + char *buf, loff_t off, size_t count) { if (count != 1 || off != 0) return -EFAULT; @@ -160,7 +160,7 @@ static bool optional_read_back_valid(struct w1_slave *sl, u8 expected) #endif static ssize_t output_write(struct file *filp, struct kobject *kobj, - struct bin_attribute *bin_attr, char *buf, + const struct bin_attribute *bin_attr, char *buf, loff_t off, size_t count) { struct w1_slave *sl = kobj_to_w1_slave(kobj); @@ -210,7 +210,7 @@ out: * Writing to the activity file resets the activity latches. */ static ssize_t activity_write(struct file *filp, struct kobject *kobj, - struct bin_attribute *bin_attr, char *buf, + const struct bin_attribute *bin_attr, char *buf, loff_t off, size_t count) { struct w1_slave *sl = kobj_to_w1_slave(kobj); @@ -240,8 +240,8 @@ error: } static ssize_t status_control_write(struct file *filp, struct kobject *kobj, - struct bin_attribute *bin_attr, char *buf, - loff_t off, size_t count) + const struct bin_attribute *bin_attr, + char *buf, loff_t off, size_t count) { struct w1_slave *sl = kobj_to_w1_slave(kobj); u8 w1_buf[4]; @@ -310,14 +310,14 @@ out: return res; } -static BIN_ATTR_RO(state, 1); -static BIN_ATTR_RW(output, 1); -static BIN_ATTR_RW(activity, 1); -static BIN_ATTR_RO(cond_search_mask, 1); -static BIN_ATTR_RO(cond_search_polarity, 1); -static BIN_ATTR_RW(status_control, 1); +static const BIN_ATTR_RO(state, 1); +static const BIN_ATTR_RW(output, 1); +static const BIN_ATTR_RW(activity, 1); +static const BIN_ATTR_RO(cond_search_mask, 1); +static const BIN_ATTR_RO(cond_search_polarity, 1); +static const BIN_ATTR_RW(status_control, 1); -static struct bin_attribute *w1_f29_bin_attrs[] = { +static const struct bin_attribute *const w1_f29_bin_attrs[] = { &bin_attr_state, &bin_attr_output, &bin_attr_activity, @@ -328,7 +328,7 @@ static struct bin_attribute *w1_f29_bin_attrs[] = { }; static const struct attribute_group w1_f29_group = { - .bin_attrs = w1_f29_bin_attrs, + .bin_attrs_new = w1_f29_bin_attrs, }; static const struct attribute_group *w1_f29_groups[] = { |