@@ -28,19 +28,19 @@ static ssize_t version_show(struct kobject *kobj,
2828static struct kobj_attribute boot_params_version_attr = __ATTR_RO (version );
2929
3030static ssize_t boot_params_data_read (struct file * fp , struct kobject * kobj ,
31- struct bin_attribute * bin_attr ,
31+ const struct bin_attribute * bin_attr ,
3232 char * buf , loff_t off , size_t count )
3333{
3434 memcpy (buf , (void * )& boot_params + off , count );
3535 return count ;
3636}
3737
38- static struct bin_attribute boot_params_data_attr = {
38+ static const struct bin_attribute boot_params_data_attr = {
3939 .attr = {
4040 .name = "data" ,
4141 .mode = S_IRUGO ,
4242 },
43- .read = boot_params_data_read ,
43+ .read_new = boot_params_data_read ,
4444 .size = sizeof (boot_params ),
4545};
4646
@@ -49,14 +49,14 @@ static struct attribute *boot_params_version_attrs[] = {
4949 NULL ,
5050};
5151
52- static struct bin_attribute * boot_params_data_attrs [] = {
52+ static const struct bin_attribute * const boot_params_data_attrs [] = {
5353 & boot_params_data_attr ,
5454 NULL ,
5555};
5656
5757static const struct attribute_group boot_params_attr_group = {
5858 .attrs = boot_params_version_attrs ,
59- .bin_attrs = boot_params_data_attrs ,
59+ .bin_attrs_new = boot_params_data_attrs ,
6060};
6161
6262static int kobj_to_setup_data_nr (struct kobject * kobj , int * nr )
@@ -172,7 +172,7 @@ static ssize_t type_show(struct kobject *kobj,
172172
173173static ssize_t setup_data_data_read (struct file * fp ,
174174 struct kobject * kobj ,
175- struct bin_attribute * bin_attr ,
175+ const struct bin_attribute * bin_attr ,
176176 char * buf ,
177177 loff_t off , size_t count )
178178{
@@ -250,22 +250,22 @@ static struct bin_attribute data_attr __ro_after_init = {
250250 .name = "data" ,
251251 .mode = S_IRUGO ,
252252 },
253- .read = setup_data_data_read ,
253+ .read_new = setup_data_data_read ,
254254};
255255
256256static struct attribute * setup_data_type_attrs [] = {
257257 & type_attr .attr ,
258258 NULL ,
259259};
260260
261- static struct bin_attribute * setup_data_data_attrs [] = {
261+ static const struct bin_attribute * const setup_data_data_attrs [] = {
262262 & data_attr ,
263263 NULL ,
264264};
265265
266266static const struct attribute_group setup_data_attr_group = {
267267 .attrs = setup_data_type_attrs ,
268- .bin_attrs = setup_data_data_attrs ,
268+ .bin_attrs_new = setup_data_data_attrs ,
269269};
270270
271271static int __init create_setup_data_node (struct kobject * parent ,
0 commit comments