@@ -41,9 +41,9 @@ static int lowpan_ctx_flag_active_get(void *data, u64 *val)
41
41
return 0 ;
42
42
}
43
43
44
- DEFINE_SIMPLE_ATTRIBUTE (lowpan_ctx_flag_active_fops ,
45
- lowpan_ctx_flag_active_get ,
46
- lowpan_ctx_flag_active_set , "%llu\n" );
44
+ DEFINE_DEBUGFS_ATTRIBUTE (lowpan_ctx_flag_active_fops ,
45
+ lowpan_ctx_flag_active_get ,
46
+ lowpan_ctx_flag_active_set , "%llu\n" );
47
47
48
48
static int lowpan_ctx_flag_c_set (void * data , u64 val )
49
49
{
@@ -66,8 +66,8 @@ static int lowpan_ctx_flag_c_get(void *data, u64 *val)
66
66
return 0 ;
67
67
}
68
68
69
- DEFINE_SIMPLE_ATTRIBUTE (lowpan_ctx_flag_c_fops , lowpan_ctx_flag_c_get ,
70
- lowpan_ctx_flag_c_set , "%llu\n" );
69
+ DEFINE_DEBUGFS_ATTRIBUTE (lowpan_ctx_flag_c_fops , lowpan_ctx_flag_c_get ,
70
+ lowpan_ctx_flag_c_set , "%llu\n" );
71
71
72
72
static int lowpan_ctx_plen_set (void * data , u64 val )
73
73
{
@@ -97,8 +97,8 @@ static int lowpan_ctx_plen_get(void *data, u64 *val)
97
97
return 0 ;
98
98
}
99
99
100
- DEFINE_SIMPLE_ATTRIBUTE (lowpan_ctx_plen_fops , lowpan_ctx_plen_get ,
101
- lowpan_ctx_plen_set , "%llu\n" );
100
+ DEFINE_DEBUGFS_ATTRIBUTE (lowpan_ctx_plen_fops , lowpan_ctx_plen_get ,
101
+ lowpan_ctx_plen_set , "%llu\n" );
102
102
103
103
static int lowpan_ctx_pfx_show (struct seq_file * file , void * offset )
104
104
{
@@ -184,15 +184,15 @@ static int lowpan_dev_debugfs_ctx_init(struct net_device *dev,
184
184
if (!root )
185
185
return - EINVAL ;
186
186
187
- dentry = debugfs_create_file ("active" , 0644 , root ,
188
- & ldev -> ctx .table [id ],
189
- & lowpan_ctx_flag_active_fops );
187
+ dentry = debugfs_create_file_unsafe ("active" , 0644 , root ,
188
+ & ldev -> ctx .table [id ],
189
+ & lowpan_ctx_flag_active_fops );
190
190
if (!dentry )
191
191
return - EINVAL ;
192
192
193
- dentry = debugfs_create_file ("compression" , 0644 , root ,
194
- & ldev -> ctx .table [id ],
195
- & lowpan_ctx_flag_c_fops );
193
+ dentry = debugfs_create_file_unsafe ("compression" , 0644 , root ,
194
+ & ldev -> ctx .table [id ],
195
+ & lowpan_ctx_flag_c_fops );
196
196
if (!dentry )
197
197
return - EINVAL ;
198
198
@@ -202,9 +202,9 @@ static int lowpan_dev_debugfs_ctx_init(struct net_device *dev,
202
202
if (!dentry )
203
203
return - EINVAL ;
204
204
205
- dentry = debugfs_create_file ("prefix_len" , 0644 , root ,
206
- & ldev -> ctx .table [id ],
207
- & lowpan_ctx_plen_fops );
205
+ dentry = debugfs_create_file_unsafe ("prefix_len" , 0644 , root ,
206
+ & ldev -> ctx .table [id ],
207
+ & lowpan_ctx_plen_fops );
208
208
if (!dentry )
209
209
return - EINVAL ;
210
210
@@ -245,8 +245,8 @@ static int lowpan_short_addr_get(void *data, u64 *val)
245
245
return 0 ;
246
246
}
247
247
248
- DEFINE_SIMPLE_ATTRIBUTE (lowpan_short_addr_fops , lowpan_short_addr_get ,
249
- NULL , "0x%04llx\n" );
248
+ DEFINE_DEBUGFS_ATTRIBUTE (lowpan_short_addr_fops , lowpan_short_addr_get , NULL ,
249
+ "0x%04llx\n" );
250
250
251
251
static int lowpan_dev_debugfs_802154_init (const struct net_device * dev ,
252
252
struct lowpan_dev * ldev )
@@ -260,9 +260,9 @@ static int lowpan_dev_debugfs_802154_init(const struct net_device *dev,
260
260
if (!root )
261
261
return - EINVAL ;
262
262
263
- dentry = debugfs_create_file ("short_addr" , 0444 , root ,
264
- lowpan_802154_dev (dev )-> wdev -> ieee802154_ptr ,
265
- & lowpan_short_addr_fops );
263
+ dentry = debugfs_create_file_unsafe ("short_addr" , 0444 , root ,
264
+ lowpan_802154_dev (dev )-> wdev -> ieee802154_ptr ,
265
+ & lowpan_short_addr_fops );
266
266
if (!dentry )
267
267
return - EINVAL ;
268
268
0 commit comments