@@ -28,19 +28,19 @@ static ssize_t version_show(struct kobject *kobj,
28
28
static struct kobj_attribute boot_params_version_attr = __ATTR_RO (version );
29
29
30
30
static 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 ,
32
32
char * buf , loff_t off , size_t count )
33
33
{
34
34
memcpy (buf , (void * )& boot_params + off , count );
35
35
return count ;
36
36
}
37
37
38
- static struct bin_attribute boot_params_data_attr = {
38
+ static const struct bin_attribute boot_params_data_attr = {
39
39
.attr = {
40
40
.name = "data" ,
41
41
.mode = S_IRUGO ,
42
42
},
43
- .read = boot_params_data_read ,
43
+ .read_new = boot_params_data_read ,
44
44
.size = sizeof (boot_params ),
45
45
};
46
46
@@ -49,14 +49,14 @@ static struct attribute *boot_params_version_attrs[] = {
49
49
NULL ,
50
50
};
51
51
52
- static struct bin_attribute * boot_params_data_attrs [] = {
52
+ static const struct bin_attribute * const boot_params_data_attrs [] = {
53
53
& boot_params_data_attr ,
54
54
NULL ,
55
55
};
56
56
57
57
static const struct attribute_group boot_params_attr_group = {
58
58
.attrs = boot_params_version_attrs ,
59
- .bin_attrs = boot_params_data_attrs ,
59
+ .bin_attrs_new = boot_params_data_attrs ,
60
60
};
61
61
62
62
static int kobj_to_setup_data_nr (struct kobject * kobj , int * nr )
@@ -172,7 +172,7 @@ static ssize_t type_show(struct kobject *kobj,
172
172
173
173
static ssize_t setup_data_data_read (struct file * fp ,
174
174
struct kobject * kobj ,
175
- struct bin_attribute * bin_attr ,
175
+ const struct bin_attribute * bin_attr ,
176
176
char * buf ,
177
177
loff_t off , size_t count )
178
178
{
@@ -250,22 +250,22 @@ static struct bin_attribute data_attr __ro_after_init = {
250
250
.name = "data" ,
251
251
.mode = S_IRUGO ,
252
252
},
253
- .read = setup_data_data_read ,
253
+ .read_new = setup_data_data_read ,
254
254
};
255
255
256
256
static struct attribute * setup_data_type_attrs [] = {
257
257
& type_attr .attr ,
258
258
NULL ,
259
259
};
260
260
261
- static struct bin_attribute * setup_data_data_attrs [] = {
261
+ static const struct bin_attribute * const setup_data_data_attrs [] = {
262
262
& data_attr ,
263
263
NULL ,
264
264
};
265
265
266
266
static const struct attribute_group setup_data_attr_group = {
267
267
.attrs = setup_data_type_attrs ,
268
- .bin_attrs = setup_data_data_attrs ,
268
+ .bin_attrs_new = setup_data_data_attrs ,
269
269
};
270
270
271
271
static int __init create_setup_data_node (struct kobject * parent ,
0 commit comments