File tree Expand file tree Collapse file tree 2 files changed +3
-28
lines changed Expand file tree Collapse file tree 2 files changed +3
-28
lines changed Original file line number Diff line number Diff line change @@ -1192,20 +1192,7 @@ static int dasd_hosts_show(struct seq_file *m, void *v)
1192
1192
return rc ;
1193
1193
}
1194
1194
1195
- static int dasd_hosts_open (struct inode * inode , struct file * file )
1196
- {
1197
- struct dasd_device * device = inode -> i_private ;
1198
-
1199
- return single_open (file , dasd_hosts_show , device );
1200
- }
1201
-
1202
- static const struct file_operations dasd_hosts_fops = {
1203
- .owner = THIS_MODULE ,
1204
- .open = dasd_hosts_open ,
1205
- .read = seq_read ,
1206
- .llseek = seq_lseek ,
1207
- .release = single_release ,
1208
- };
1195
+ DEFINE_SHOW_ATTRIBUTE (dasd_hosts );
1209
1196
1210
1197
static void dasd_hosts_exit (struct dasd_device * device )
1211
1198
{
Original file line number Diff line number Diff line change @@ -190,19 +190,7 @@ static int qstat_show(struct seq_file *m, void *v)
190
190
return 0 ;
191
191
}
192
192
193
- static int qstat_seq_open (struct inode * inode , struct file * filp )
194
- {
195
- return single_open (filp , qstat_show ,
196
- file_inode (filp )-> i_private );
197
- }
198
-
199
- static const struct file_operations debugfs_fops = {
200
- .owner = THIS_MODULE ,
201
- .open = qstat_seq_open ,
202
- .read = seq_read ,
203
- .llseek = seq_lseek ,
204
- .release = single_release ,
205
- };
193
+ DEFINE_SHOW_ATTRIBUTE (qstat );
206
194
207
195
static char * qperf_names [] = {
208
196
"Assumed adapter interrupts" ,
@@ -306,7 +294,7 @@ static void setup_debugfs_entry(struct qdio_q *q)
306
294
q -> is_input_q ? "input" : "output" ,
307
295
q -> nr );
308
296
q -> debugfs_q = debugfs_create_file (name , S_IFREG | S_IRUGO | S_IWUSR ,
309
- q -> irq_ptr -> debugfs_dev , q , & debugfs_fops );
297
+ q -> irq_ptr -> debugfs_dev , q , & qstat_fops );
310
298
if (IS_ERR (q -> debugfs_q ))
311
299
q -> debugfs_q = NULL ;
312
300
}
You can’t perform that action at this time.
0 commit comments