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/sky2.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/sky2.c')
-rw-r--r-- | drivers/net/ethernet/marvell/sky2.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/drivers/net/ethernet/marvell/sky2.c b/drivers/net/ethernet/marvell/sky2.c index c7cd0081058e..f3a5fa84860f 100644 --- a/drivers/net/ethernet/marvell/sky2.c +++ b/drivers/net/ethernet/marvell/sky2.c @@ -4621,19 +4621,7 @@ static int sky2_debug_show(struct seq_file *seq, void *v) napi_enable(&hw->napi); return 0; } - -static int sky2_debug_open(struct inode *inode, struct file *file) -{ - return single_open(file, sky2_debug_show, inode->i_private); -} - -static const struct file_operations sky2_debug_fops = { - .owner = THIS_MODULE, - .open = sky2_debug_open, - .read = seq_read, - .llseek = seq_lseek, - .release = single_release, -}; +DEFINE_SHOW_ATTRIBUTE(sky2_debug); /* * Use network device events to create/remove/rename |