Commit 2be13945 authored by Yangtao Li's avatar Yangtao Li Committed by Greg Kroah-Hartman
Browse files

staging: unisys: convert to DEFINE_SHOW_ATTRIBUTE



Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code.

Signed-off-by: default avatarYangtao Li <tiny.windzz@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 29f85260
Loading
Loading
Loading
Loading
+1 −13
Original line number Diff line number Diff line
@@ -681,19 +681,7 @@ static int info_debugfs_show(struct seq_file *seq, void *v)

	return 0;
}

static int info_debugfs_open(struct inode *inode, struct file *file)
{
	return single_open(file, info_debugfs_show, inode->i_private);
}

static const struct file_operations info_debugfs_fops = {
	.owner = THIS_MODULE,
	.open = info_debugfs_open,
	.read = seq_read,
	.llseek = seq_lseek,
	.release = single_release,
};
DEFINE_SHOW_ATTRIBUTE(info_debugfs);

/*
 * complete_taskmgmt_command - Complete task management