@@ -271,8 +271,8 @@ void pci_vpd_init(struct pci_dev *dev)
271
271
}
272
272
273
273
static ssize_t vpd_read (struct file * filp , struct kobject * kobj ,
274
- struct bin_attribute * bin_attr , char * buf , loff_t off ,
275
- size_t count )
274
+ const struct bin_attribute * bin_attr , char * buf ,
275
+ loff_t off , size_t count )
276
276
{
277
277
struct pci_dev * dev = to_pci_dev (kobj_to_dev (kobj ));
278
278
struct pci_dev * vpd_dev = dev ;
@@ -295,8 +295,8 @@ static ssize_t vpd_read(struct file *filp, struct kobject *kobj,
295
295
}
296
296
297
297
static ssize_t vpd_write (struct file * filp , struct kobject * kobj ,
298
- struct bin_attribute * bin_attr , char * buf , loff_t off ,
299
- size_t count )
298
+ const struct bin_attribute * bin_attr , char * buf ,
299
+ loff_t off , size_t count )
300
300
{
301
301
struct pci_dev * dev = to_pci_dev (kobj_to_dev (kobj ));
302
302
struct pci_dev * vpd_dev = dev ;
@@ -317,9 +317,9 @@ static ssize_t vpd_write(struct file *filp, struct kobject *kobj,
317
317
318
318
return ret ;
319
319
}
320
- static BIN_ATTR (vpd , 0600 , vpd_read , vpd_write , 0 ) ;
320
+ static const BIN_ATTR (vpd , 0600 , vpd_read , vpd_write , 0 ) ;
321
321
322
- static struct bin_attribute * vpd_attrs [] = {
322
+ static const struct bin_attribute * const vpd_attrs [] = {
323
323
& bin_attr_vpd ,
324
324
NULL ,
325
325
};
@@ -336,7 +336,7 @@ static umode_t vpd_attr_is_visible(struct kobject *kobj,
336
336
}
337
337
338
338
const struct attribute_group pci_dev_vpd_attr_group = {
339
- .bin_attrs = vpd_attrs ,
339
+ .bin_attrs_new = vpd_attrs ,
340
340
.is_bin_visible = vpd_attr_is_visible ,
341
341
};
342
342
0 commit comments