diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2018-01-22 17:05:43 +0100 |
---|---|---|
committer | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2018-02-07 11:50:21 +0100 |
commit | a08f06bb7a0743a7fc8d571899c93d882468096e (patch) | |
tree | 27168380ec79b56895dbce004ffe940d0065450d /drivers/platform | |
parent | Merge branch 'akpm' (patches from Andrew) (diff) | |
download | linux-a08f06bb7a0743a7fc8d571899c93d882468096e.tar.xz linux-a08f06bb7a0743a7fc8d571899c93d882468096e.zip |
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')
-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); |