Skip to content

Commit f79ba43

Browse files
TinyWindzzholtmann
authored andcommitted
6lowpan: 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: Marcel Holtmann <marcel@holtmann.org>
1 parent b12c97d commit f79ba43

1 file changed

Lines changed: 1 addition & 12 deletions

File tree

‎net/6lowpan/debugfs.c‎

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -232,18 +232,7 @@ static int lowpan_context_show(struct seq_file *file, void *offset)
232232

233233
return 0;
234234
}
235-
236-
static int lowpan_context_open(struct inode *inode, struct file *file)
237-
{
238-
return single_open(file, lowpan_context_show, inode->i_private);
239-
}
240-
241-
static const struct file_operations lowpan_context_fops = {
242-
.open = lowpan_context_open,
243-
.read = seq_read,
244-
.llseek = seq_lseek,
245-
.release = single_release,
246-
};
235+
DEFINE_SHOW_ATTRIBUTE(lowpan_context);
247236

248237
static int lowpan_short_addr_get(void *data, u64 *val)
249238
{

0 commit comments

Comments
 (0)