diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2018-01-22 19:05:43 +0300 |
---|---|---|
committer | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2018-02-07 13:50:21 +0300 |
commit | a08f06bb7a0743a7fc8d571899c93d882468096e (patch) | |
tree | 27168380ec79b56895dbce004ffe940d0065450d /drivers/mfd | |
parent | a2e5790d841658485d642196dbb0927303d6c22f (diff) | |
download | linux-a08f06bb7a0743a7fc8d571899c93d882468096e.tar.xz |
seq_file: Introduce DEFINE_SHOW_ATTRIBUTE() helper macro
The DEFINE_SHOW_ATTRIBUTE() helper macro would be useful for current
users, which are many of them, and for new comers to decrease code
duplication.
Acked-by: Lee Jones <lee.jones@linaro.org>
Acked-by: Darren Hart (VMware) <dvhart@infradead.org>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Diffstat (limited to 'drivers/mfd')
-rw-r--r-- | drivers/mfd/ab8500-debugfs.c | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/drivers/mfd/ab8500-debugfs.c b/drivers/mfd/ab8500-debugfs.c index 1afa27de7191..fcb3a92ae85f 100644 --- a/drivers/mfd/ab8500-debugfs.c +++ b/drivers/mfd/ab8500-debugfs.c @@ -1258,20 +1258,6 @@ static struct ab8500_prcmu_ranges ab8540_debug_ranges[AB8500_NUM_BANKS] = { }, }; -#define DEFINE_SHOW_ATTRIBUTE(__name) \ -static int __name ## _open(struct inode *inode, struct file *file) \ -{ \ - return single_open(file, __name ## _show, inode->i_private); \ -} \ - \ -static const struct file_operations __name ## _fops = { \ - .owner = THIS_MODULE, \ - .open = __name ## _open, \ - .read = seq_read, \ - .llseek = seq_lseek, \ - .release = single_release, \ -} \ - static irqreturn_t ab8500_debug_handler(int irq, void *data) { char buf[16]; |