Message ID | 20200716090411.13573-1-miaoqinglang@huawei.com (mailing list archive) |
---|---|
State | Changes Requested |
Delegated to: | Herbert Xu |
Headers | show |
Series | [-next] crypto: amlogic: Convert to DEFINE_SHOW_ATTRIBUTE | expand |
On Thu, Jul 16, 2020 at 05:04:11PM +0800, Qinglang Miao wrote: > From: Liu Shixin <liushixin2@huawei.com> > > Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. > > Signed-off-by: Liu Shixin <liushixin2@huawei.com> > --- > drivers/crypto/amlogic/amlogic-gxl-core.c | 15 ++------------- > 1 file changed, 2 insertions(+), 13 deletions(-) > Acked-by: Corentin Labbe <clabbe@baylibre.com> Tested-by: Corentin Labbe <clabbe@baylibre.com> Thanks
diff --git a/drivers/crypto/amlogic/amlogic-gxl-core.c b/drivers/crypto/amlogic/amlogic-gxl-core.c index 112be2441..c57501bfa 100644 --- a/drivers/crypto/amlogic/amlogic-gxl-core.c +++ b/drivers/crypto/amlogic/amlogic-gxl-core.c @@ -96,7 +96,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; @@ -117,18 +117,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_iter = seq_read_iter, - .llseek = seq_lseek, - .release = single_release, -}; +DEFINE_SHOW_ATTRIBUTE(meson_debugfs); #endif static void meson_free_chanlist(struct meson_dev *mc, int i)