diff options
author | Yangtao Li <tiny.windzz@gmail.com> | 2018-12-05 19:18:57 +0300 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2018-12-17 09:19:41 +0300 |
commit | 8e1897bc8eaf1383d6b33d5232136221ffd9c818 (patch) | |
tree | 4bb24a1c1ab364363bdd8014eaec93041486c45d /drivers/dma/amba-pl08x.c | |
parent | a5b21a8ba2a0d6ab114b8ca9c8423e84f47844b1 (diff) | |
download | linux-8e1897bc8eaf1383d6b33d5232136221ffd9c818.tar.xz |
dmaengine: amba-pl08x: convert to DEFINE_SHOW_ATTRIBUTE
Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code.
Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/dma/amba-pl08x.c')
-rw-r--r-- | drivers/dma/amba-pl08x.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/drivers/dma/amba-pl08x.c b/drivers/dma/amba-pl08x.c index 97483df1f82e..fc8c2bab563c 100644 --- a/drivers/dma/amba-pl08x.c +++ b/drivers/dma/amba-pl08x.c @@ -2505,24 +2505,14 @@ static int pl08x_debugfs_show(struct seq_file *s, void *data) return 0; } -static int pl08x_debugfs_open(struct inode *inode, struct file *file) -{ - return single_open(file, pl08x_debugfs_show, inode->i_private); -} - -static const struct file_operations pl08x_debugfs_operations = { - .open = pl08x_debugfs_open, - .read = seq_read, - .llseek = seq_lseek, - .release = single_release, -}; +DEFINE_SHOW_ATTRIBUTE(pl08x_debugfs); static void init_pl08x_debugfs(struct pl08x_driver_data *pl08x) { /* Expose a simple debugfs interface to view all clocks */ (void) debugfs_create_file(dev_name(&pl08x->adev->dev), S_IFREG | S_IRUGO, NULL, pl08x, - &pl08x_debugfs_operations); + &pl08x_debugfs_fops); } #else |