Commit 106aaab3 authored by Qinglang Miao's avatar Qinglang Miao Committed by Herbert Xu

crypto: hisilicon/qm - Convert to DEFINE_SHOW_ATTRIBUTE

Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code.
Signed-off-by: default avatarQinglang Miao <miaoqinglang@huawei.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent f4648518
...@@ -1050,17 +1050,7 @@ static int qm_regs_show(struct seq_file *s, void *unused) ...@@ -1050,17 +1050,7 @@ static int qm_regs_show(struct seq_file *s, void *unused)
return 0; return 0;
} }
static int qm_regs_open(struct inode *inode, struct file *file) DEFINE_SHOW_ATTRIBUTE(qm_regs);
{
return single_open(file, qm_regs_show, inode->i_private);
}
static const struct file_operations qm_regs_fops = {
.owner = THIS_MODULE,
.open = qm_regs_open,
.read = seq_read,
.release = single_release,
};
static ssize_t qm_cmd_read(struct file *filp, char __user *buffer, static ssize_t qm_cmd_read(struct file *filp, char __user *buffer,
size_t count, loff_t *pos) size_t count, loff_t *pos)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment