Skip to content

Commit a93f5b5

Browse files
TinyWindzzdavem330
authored andcommitted
fjes: convert to DEFINE_SHOW_ATTRIBUTE
Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Yangtao Li <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 5061e3f commit a93f5b5

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

drivers/net/fjes/fjes_debugfs.c

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -62,19 +62,7 @@ static int fjes_dbg_status_show(struct seq_file *m, void *v)
6262

6363
return 0;
6464
}
65-
66-
static int fjes_dbg_status_open(struct inode *inode, struct file *file)
67-
{
68-
return single_open(file, fjes_dbg_status_show, inode->i_private);
69-
}
70-
71-
static const struct file_operations fjes_dbg_status_fops = {
72-
.owner = THIS_MODULE,
73-
.open = fjes_dbg_status_open,
74-
.read = seq_read,
75-
.llseek = seq_lseek,
76-
.release = single_release,
77-
};
65+
DEFINE_SHOW_ATTRIBUTE(fjes_dbg_status);
7866

7967
void fjes_dbg_adapter_init(struct fjes_adapter *adapter)
8068
{

0 commit comments

Comments
 (0)