Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

interconnect: 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: Georgi Djakov <georgi.djakov@linaro.org>

authored by

Yangtao Li and committed by
Georgi Djakov
83fdb2df f03f73c2

+1 -12
+1 -12
drivers/interconnect/core.c
··· 90 90 91 91 return 0; 92 92 } 93 - 94 - static int icc_summary_open(struct inode *inode, struct file *file) 95 - { 96 - return single_open(file, icc_summary_show, inode->i_private); 97 - } 98 - 99 - static const struct file_operations icc_summary_fops = { 100 - .open = icc_summary_open, 101 - .read = seq_read, 102 - .llseek = seq_lseek, 103 - .release = single_release, 104 - }; 93 + DEFINE_SHOW_ATTRIBUTE(icc_summary); 105 94 106 95 static struct icc_node *node_find(const int id) 107 96 {