diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2018-01-22 18:05:43 +0200 |
---|---|---|
committer | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2018-02-07 12:50:21 +0200 |
commit | a08f06bb7a0743a7fc8d571899c93d882468096e (patch) | |
tree | 27168380ec79b56895dbce004ffe940d0065450d /drivers/platform/x86/pmc_atom.c | |
parent | a2e5790d841658485d642196dbb0927303d6c22f (diff) |
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/platform/x86/pmc_atom.c')
-rw-r--r-- | drivers/platform/x86/pmc_atom.c | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/drivers/platform/x86/pmc_atom.c b/drivers/platform/x86/pmc_atom.c index 4b3c37b6288c..8f018b3f3cd4 100644 --- a/drivers/platform/x86/pmc_atom.c +++ b/drivers/platform/x86/pmc_atom.c @@ -208,20 +208,6 @@ static const struct pmc_data cht_data = { .clks = cht_clks, }; -#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 inline u32 pmc_reg_read(struct pmc_dev *pmc, int reg_offset) { return readl(pmc->regmap + reg_offset); |