diff options
author | Qinglang Miao <miaoqinglang@huawei.com> | 2020-09-18 03:31:13 +0200 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2020-09-25 09:48:16 +0200 |
commit | 106aaab3fc0e5a40cad9c0f713581cbeda067af5 (patch) | |
tree | 1ef68083ad9691d060ef3154e91cf54943cc472b /drivers/crypto/hisilicon/qm.c | |
parent | crypto: cavium/zip - Convert to DEFINE_SHOW_ATTRIBUTE (diff) | |
download | linux-106aaab3fc0e5a40cad9c0f713581cbeda067af5.tar.xz linux-106aaab3fc0e5a40cad9c0f713581cbeda067af5.zip |
crypto: hisilicon/qm - Convert to DEFINE_SHOW_ATTRIBUTE
Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code.
Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to '')
-rw-r--r-- | drivers/crypto/hisilicon/qm.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/crypto/hisilicon/qm.c b/drivers/crypto/hisilicon/qm.c index 07efc528379c..1923f153db18 100644 --- a/drivers/crypto/hisilicon/qm.c +++ b/drivers/crypto/hisilicon/qm.c @@ -1050,17 +1050,7 @@ static int qm_regs_show(struct seq_file *s, void *unused) return 0; } -static int qm_regs_open(struct inode *inode, struct file *file) -{ - 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, -}; +DEFINE_SHOW_ATTRIBUTE(qm_regs); static ssize_t qm_cmd_read(struct file *filp, char __user *buffer, size_t count, loff_t *pos) |