diff options
author | Qinglang Miao <miaoqinglang@huawei.com> | 2020-09-18 03:31:10 +0200 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2020-09-25 09:48:16 +0200 |
commit | b11d90639aa7d37a7133887db76b7fd697072343 (patch) | |
tree | 4103f907a41539040667f2d77c9a365f8a80cd59 /drivers/crypto/amlogic | |
parent | crypto: allwinner - Convert to DEFINE_SHOW_ATTRIBUTE (diff) | |
download | linux-b11d90639aa7d37a7133887db76b7fd697072343.tar.xz linux-b11d90639aa7d37a7133887db76b7fd697072343.zip |
crypto: amlogic - 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 'drivers/crypto/amlogic')
-rw-r--r-- | drivers/crypto/amlogic/amlogic-gxl-core.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/drivers/crypto/amlogic/amlogic-gxl-core.c b/drivers/crypto/amlogic/amlogic-gxl-core.c index 466552acbbbb..5bbeff433c8c 100644 --- a/drivers/crypto/amlogic/amlogic-gxl-core.c +++ b/drivers/crypto/amlogic/amlogic-gxl-core.c @@ -98,7 +98,7 @@ static struct meson_alg_template mc_algs[] = { }; #ifdef CONFIG_CRYPTO_DEV_AMLOGIC_GXL_DEBUG -static int meson_dbgfs_read(struct seq_file *seq, void *v) +static int meson_debugfs_show(struct seq_file *seq, void *v) { struct meson_dev *mc = seq->private; int i; @@ -118,19 +118,7 @@ static int meson_dbgfs_read(struct seq_file *seq, void *v) } return 0; } - -static int meson_dbgfs_open(struct inode *inode, struct file *file) -{ - return single_open(file, meson_dbgfs_read, inode->i_private); -} - -static const struct file_operations meson_debugfs_fops = { - .owner = THIS_MODULE, - .open = meson_dbgfs_open, - .read = seq_read, - .llseek = seq_lseek, - .release = single_release, -}; +DEFINE_SHOW_ATTRIBUTE(meson_debugfs); #endif static void meson_free_chanlist(struct meson_dev *mc, int i) |