Skip to content

Commit

Permalink
interconnect: convert to DEFINE_SHOW_ATTRIBUTE
Browse files Browse the repository at this point in the history
Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code.

Signed-off-by: Yangtao Li <[email protected]>
Signed-off-by: Georgi Djakov <[email protected]>
  • Loading branch information
TinyWindzz authored and Georgi Djakov committed Apr 6, 2019
1 parent f03f73c commit 83fdb2d
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions drivers/interconnect/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,18 +90,7 @@ static int icc_summary_show(struct seq_file *s, void *data)

return 0;
}

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

static const struct file_operations icc_summary_fops = {
.open = icc_summary_open,
.read = seq_read,
.llseek = seq_lseek,
.release = single_release,
};
DEFINE_SHOW_ATTRIBUTE(icc_summary);

static struct icc_node *node_find(const int id)
{
Expand Down

0 comments on commit 83fdb2d

Please sign in to comment.