File tree Expand file tree Collapse file tree 1 file changed +3
-15
lines changed Expand file tree Collapse file tree 1 file changed +3
-15
lines changed Original file line number Diff line number Diff line change @@ -186,27 +186,15 @@ static const struct file_operations xenvif_dbg_io_ring_ops_fops = {
186
186
.write = xenvif_write_io_ring ,
187
187
};
188
188
189
- static int xenvif_read_ctrl (struct seq_file * m , void * v )
189
+ static int xenvif_ctrl_show (struct seq_file * m , void * v )
190
190
{
191
191
struct xenvif * vif = m -> private ;
192
192
193
193
xenvif_dump_hash_info (vif , m );
194
194
195
195
return 0 ;
196
196
}
197
-
198
- static int xenvif_ctrl_open (struct inode * inode , struct file * filp )
199
- {
200
- return single_open (filp , xenvif_read_ctrl , inode -> i_private );
201
- }
202
-
203
- static const struct file_operations xenvif_dbg_ctrl_ops_fops = {
204
- .owner = THIS_MODULE ,
205
- .open = xenvif_ctrl_open ,
206
- .read = seq_read ,
207
- .llseek = seq_lseek ,
208
- .release = single_release ,
209
- };
197
+ DEFINE_SHOW_ATTRIBUTE (xenvif_ctrl );
210
198
211
199
static void xenvif_debugfs_addif (struct xenvif * vif )
212
200
{
@@ -238,7 +226,7 @@ static void xenvif_debugfs_addif(struct xenvif *vif)
238
226
0400 ,
239
227
vif -> xenvif_dbg_root ,
240
228
vif ,
241
- & xenvif_dbg_ctrl_ops_fops );
229
+ & xenvif_ctrl_fops );
242
230
if (IS_ERR_OR_NULL (pfile ))
243
231
pr_warn ("Creation of ctrl file returned %ld!\n" ,
244
232
PTR_ERR (pfile ));
You can’t perform that action at this time.
0 commit comments