diff options
author | Yangtao Li <tiny.windzz@gmail.com> | 2018-12-03 17:34:11 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-12-04 04:33:44 +0300 |
commit | d9bbd6a1a56eccb2b1198b8f2008d622982df0a1 (patch) | |
tree | 292f301182acde8e5ae04ba051e3f9efcfcb6b47 /drivers/net/ethernet/marvell/skge.c | |
parent | 25079154f71170f615f67c33d47af1188117668b (diff) | |
download | linux-d9bbd6a1a56eccb2b1198b8f2008d622982df0a1.tar.xz |
net: marvell: convert to DEFINE_SHOW_ATTRIBUTE
Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code.
Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/marvell/skge.c')
-rw-r--r-- | drivers/net/ethernet/marvell/skge.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/drivers/net/ethernet/marvell/skge.c b/drivers/net/ethernet/marvell/skge.c index 9c08c3650c02..04fd1f135011 100644 --- a/drivers/net/ethernet/marvell/skge.c +++ b/drivers/net/ethernet/marvell/skge.c @@ -3732,19 +3732,7 @@ static int skge_debug_show(struct seq_file *seq, void *v) return 0; } - -static int skge_debug_open(struct inode *inode, struct file *file) -{ - return single_open(file, skge_debug_show, inode->i_private); -} - -static const struct file_operations skge_debug_fops = { - .owner = THIS_MODULE, - .open = skge_debug_open, - .read = seq_read, - .llseek = seq_lseek, - .release = single_release, -}; +DEFINE_SHOW_ATTRIBUTE(skge_debug); /* * Use network device events to create/remove/rename |