Commit b11d9063 authored by Qinglang Miao's avatar Qinglang Miao Committed by Herbert Xu

crypto: amlogic - 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 560daf9e
...@@ -98,7 +98,7 @@ static struct meson_alg_template mc_algs[] = { ...@@ -98,7 +98,7 @@ static struct meson_alg_template mc_algs[] = {
}; };
#ifdef CONFIG_CRYPTO_DEV_AMLOGIC_GXL_DEBUG #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; struct meson_dev *mc = seq->private;
int i; int i;
...@@ -118,19 +118,7 @@ static int meson_dbgfs_read(struct seq_file *seq, void *v) ...@@ -118,19 +118,7 @@ static int meson_dbgfs_read(struct seq_file *seq, void *v)
} }
return 0; return 0;
} }
DEFINE_SHOW_ATTRIBUTE(meson_debugfs);
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,
};
#endif #endif
static void meson_free_chanlist(struct meson_dev *mc, int i) static void meson_free_chanlist(struct meson_dev *mc, int i)
......
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