Skip to content

Commit f578e67

Browse files
TinyWindzzdavem330
authored andcommitted
ieee802154: at86rf230: 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 b1dd054 commit f578e67

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

drivers/net/ieee802154/at86rf230.c

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1632,18 +1632,7 @@ static int at86rf230_stats_show(struct seq_file *file, void *offset)
16321632
seq_printf(file, "INVALID:\t\t%8llu\n", lp->trac.invalid);
16331633
return 0;
16341634
}
1635-
1636-
static int at86rf230_stats_open(struct inode *inode, struct file *file)
1637-
{
1638-
return single_open(file, at86rf230_stats_show, inode->i_private);
1639-
}
1640-
1641-
static const struct file_operations at86rf230_stats_fops = {
1642-
.open = at86rf230_stats_open,
1643-
.read = seq_read,
1644-
.llseek = seq_lseek,
1645-
.release = single_release,
1646-
};
1635+
DEFINE_SHOW_ATTRIBUTE(at86rf230_stats);
16471636

16481637
static int at86rf230_debugfs_init(struct at86rf230_local *lp)
16491638
{

0 commit comments

Comments
 (0)