@@ -135,7 +135,7 @@ static ssize_t recover_store(struct device *dev, struct device_attribute *attr,
135135static DEVICE_ATTR_WO (recover );
136136
137137static ssize_t util_string_read (struct file * filp , struct kobject * kobj ,
138- struct bin_attribute * attr , char * buf ,
138+ const struct bin_attribute * attr , char * buf ,
139139 loff_t off , size_t count )
140140{
141141 struct device * dev = kobj_to_dev (kobj );
@@ -145,10 +145,10 @@ static ssize_t util_string_read(struct file *filp, struct kobject *kobj,
145145 return memory_read_from_buffer (buf , count , & off , zdev -> util_str ,
146146 sizeof (zdev -> util_str ));
147147}
148- static BIN_ATTR_RO (util_string , CLP_UTIL_STR_LEN ) ;
148+ static const BIN_ATTR_RO (util_string , CLP_UTIL_STR_LEN ) ;
149149
150150static ssize_t report_error_write (struct file * filp , struct kobject * kobj ,
151- struct bin_attribute * attr , char * buf ,
151+ const struct bin_attribute * attr , char * buf ,
152152 loff_t off , size_t count )
153153{
154154 struct zpci_report_error_header * report = (void * ) buf ;
@@ -164,7 +164,7 @@ static ssize_t report_error_write(struct file *filp, struct kobject *kobj,
164164
165165 return ret ? ret : count ;
166166}
167- static BIN_ATTR (report_error , S_IWUSR , NULL, report_error_write , PAGE_SIZE ) ;
167+ static const BIN_ATTR (report_error , S_IWUSR , NULL, report_error_write , PAGE_SIZE ) ;
168168
169169static ssize_t uid_is_unique_show (struct device * dev ,
170170 struct device_attribute * attr , char * buf )
@@ -203,7 +203,7 @@ const struct attribute_group zpci_ident_attr_group = {
203203 .is_visible = zpci_index_is_visible ,
204204};
205205
206- static struct bin_attribute * zpci_bin_attrs [] = {
206+ static const struct bin_attribute * const zpci_bin_attrs [] = {
207207 & bin_attr_util_string ,
208208 & bin_attr_report_error ,
209209 NULL ,
@@ -227,7 +227,7 @@ static struct attribute *zpci_dev_attrs[] = {
227227
228228const struct attribute_group zpci_attr_group = {
229229 .attrs = zpci_dev_attrs ,
230- .bin_attrs = zpci_bin_attrs ,
230+ .bin_attrs_new = zpci_bin_attrs ,
231231};
232232
233233static struct attribute * pfip_attrs [] = {
0 commit comments