@@ -26,7 +26,7 @@ struct module_sect_attrs {
26
26
27
27
#define MODULE_SECT_READ_SIZE (3 /* "0x", "\n" */ + (BITS_PER_LONG / 4 ))
28
28
static ssize_t module_sect_read (struct file * file , struct kobject * kobj ,
29
- struct bin_attribute * battr ,
29
+ const struct bin_attribute * battr ,
30
30
char * buf , loff_t pos , size_t count )
31
31
{
32
32
char bounce [MODULE_SECT_READ_SIZE + 1 ];
@@ -54,18 +54,18 @@ static ssize_t module_sect_read(struct file *file, struct kobject *kobj,
54
54
55
55
static void free_sect_attrs (struct module_sect_attrs * sect_attrs )
56
56
{
57
- struct bin_attribute * * bin_attr ;
57
+ const struct bin_attribute * const * bin_attr ;
58
58
59
- for (bin_attr = sect_attrs -> grp .bin_attrs ; * bin_attr ; bin_attr ++ )
59
+ for (bin_attr = sect_attrs -> grp .bin_attrs_new ; * bin_attr ; bin_attr ++ )
60
60
kfree ((* bin_attr )-> attr .name );
61
- kfree (sect_attrs -> grp .bin_attrs );
61
+ kfree (sect_attrs -> grp .bin_attrs_new );
62
62
kfree (sect_attrs );
63
63
}
64
64
65
65
static int add_sect_attrs (struct module * mod , const struct load_info * info )
66
66
{
67
67
struct module_sect_attrs * sect_attrs ;
68
- struct bin_attribute * * gattr ;
68
+ const struct bin_attribute * * gattr ;
69
69
struct bin_attribute * sattr ;
70
70
unsigned int nloaded = 0 , i ;
71
71
int ret ;
@@ -86,7 +86,7 @@ static int add_sect_attrs(struct module *mod, const struct load_info *info)
86
86
87
87
/* Setup section attributes. */
88
88
sect_attrs -> grp .name = "sections" ;
89
- sect_attrs -> grp .bin_attrs = gattr ;
89
+ sect_attrs -> grp .bin_attrs_new = gattr ;
90
90
91
91
sattr = & sect_attrs -> attrs [0 ];
92
92
for (i = 0 ; i < info -> hdr -> e_shnum ; i ++ ) {
@@ -101,7 +101,7 @@ static int add_sect_attrs(struct module *mod, const struct load_info *info)
101
101
ret = - ENOMEM ;
102
102
goto out ;
103
103
}
104
- sattr -> read = module_sect_read ;
104
+ sattr -> read_new = module_sect_read ;
105
105
sattr -> private = (void * )sec -> sh_addr ;
106
106
sattr -> size = MODULE_SECT_READ_SIZE ;
107
107
sattr -> attr .mode = 0400 ;
@@ -144,15 +144,15 @@ struct module_notes_attrs {
144
144
145
145
static void free_notes_attrs (struct module_notes_attrs * notes_attrs )
146
146
{
147
- kfree (notes_attrs -> grp .bin_attrs );
147
+ kfree (notes_attrs -> grp .bin_attrs_new );
148
148
kfree (notes_attrs );
149
149
}
150
150
151
151
static int add_notes_attrs (struct module * mod , const struct load_info * info )
152
152
{
153
153
unsigned int notes , loaded , i ;
154
154
struct module_notes_attrs * notes_attrs ;
155
- struct bin_attribute * * gattr ;
155
+ const struct bin_attribute * * gattr ;
156
156
struct bin_attribute * nattr ;
157
157
int ret ;
158
158
@@ -178,7 +178,7 @@ static int add_notes_attrs(struct module *mod, const struct load_info *info)
178
178
}
179
179
180
180
notes_attrs -> grp .name = "notes" ;
181
- notes_attrs -> grp .bin_attrs = gattr ;
181
+ notes_attrs -> grp .bin_attrs_new = gattr ;
182
182
183
183
nattr = & notes_attrs -> attrs [0 ];
184
184
for (loaded = i = 0 ; i < info -> hdr -> e_shnum ; ++ i ) {
0 commit comments