aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform/x86/pmc_atom.c
diff options
context:
space:
mode:
authorAndy Shevchenko <[email protected]>2018-01-22 16:05:43 +0000
committerAndy Shevchenko <[email protected]>2018-02-07 10:50:21 +0000
commita08f06bb7a0743a7fc8d571899c93d882468096e (patch)
tree27168380ec79b56895dbce004ffe940d0065450d /drivers/platform/x86/pmc_atom.c
parentMerge branch 'akpm' (patches from Andrew) (diff)
downloadkernel-a08f06bb7a0743a7fc8d571899c93d882468096e.tar.gz
kernel-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 <[email protected]> Acked-by: Darren Hart (VMware) <[email protected]> Signed-off-by: Andy Shevchenko <[email protected]>
Diffstat (limited to 'drivers/platform/x86/pmc_atom.c')
-rw-r--r--drivers/platform/x86/pmc_atom.c14
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);