Skip to content

Commit 4e6feb7

Browse files
TinyWindzzdavem330
authored andcommitted
bonding: 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 a93f5b5 commit 4e6feb7

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

drivers/net/bonding/bond_debugfs.c

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

4646
return 0;
4747
}
48-
49-
static int bond_debug_rlb_hash_open(struct inode *inode, struct file *file)
50-
{
51-
return single_open(file, bond_debug_rlb_hash_show, inode->i_private);
52-
}
53-
54-
static const struct file_operations bond_debug_rlb_hash_fops = {
55-
.owner = THIS_MODULE,
56-
.open = bond_debug_rlb_hash_open,
57-
.read = seq_read,
58-
.llseek = seq_lseek,
59-
.release = single_release,
60-
};
48+
DEFINE_SHOW_ATTRIBUTE(bond_debug_rlb_hash);
6149

6250
void bond_debug_register(struct bonding *bond)
6351
{

0 commit comments

Comments
 (0)