summaryrefslogtreecommitdiffstats
path: root/drivers/crypto/qat/qat_common/adf_cfg.c
diff options
context:
space:
mode:
authorLiu Shixin <liushixin2@huawei.com>2020-09-16 10:50:17 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2020-09-25 17:48:13 +1000
commit406d454bc8746c1f629153abb2421ca280baa6e6 (patch)
treee8615a2be74c2a9a2552dbed9f2eb5fbb0cf9442 /drivers/crypto/qat/qat_common/adf_cfg.c
parent255f6c2e74b136662a191652d688bd7566c94bf6 (diff)
downloadlinux-stable-406d454bc8746c1f629153abb2421ca280baa6e6.tar.gz
linux-stable-406d454bc8746c1f629153abb2421ca280baa6e6.tar.bz2
linux-stable-406d454bc8746c1f629153abb2421ca280baa6e6.zip
crypto: qat - convert to use DEFINE_SEQ_ATTRIBUTE macro
Use DEFINE_SEQ_ATTRIBUTE macro to simplify the code. Signed-off-by: Liu Shixin <liushixin2@huawei.com> Acked-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/qat/qat_common/adf_cfg.c')
-rw-r--r--drivers/crypto/qat/qat_common/adf_cfg.c19
1 files changed, 1 insertions, 18 deletions
diff --git a/drivers/crypto/qat/qat_common/adf_cfg.c b/drivers/crypto/qat/qat_common/adf_cfg.c
index ac462796cefc..22ae32838113 100644
--- a/drivers/crypto/qat/qat_common/adf_cfg.c
+++ b/drivers/crypto/qat/qat_common/adf_cfg.c
@@ -52,24 +52,7 @@ static const struct seq_operations qat_dev_cfg_sops = {
.show = qat_dev_cfg_show
};
-static int qat_dev_cfg_open(struct inode *inode, struct file *file)
-{
- int ret = seq_open(file, &qat_dev_cfg_sops);
-
- if (!ret) {
- struct seq_file *seq_f = file->private_data;
-
- seq_f->private = inode->i_private;
- }
- return ret;
-}
-
-static const struct file_operations qat_dev_cfg_fops = {
- .open = qat_dev_cfg_open,
- .read = seq_read,
- .llseek = seq_lseek,
- .release = seq_release
-};
+DEFINE_SEQ_ATTRIBUTE(qat_dev_cfg);
/**
* adf_cfg_dev_add() - Create an acceleration device configuration table.