summaryrefslogtreecommitdiff
path: root/drivers/mtd/devices/docg3.h
diff options
context:
space:
mode:
authorYangtao Li <tiny.windzz@gmail.com>2018-12-02 11:33:58 +0300
committerBoris Brezillon <boris.brezillon@bootlin.com>2018-12-03 13:32:26 +0300
commitc78f59d7145e7f729c8df58fa7f99ecf66225ddc (patch)
treed5043a0cc6b3d1f36712c87a414141416ac8dfed /drivers/mtd/devices/docg3.h
parentbafae53817e7f3a47ed74cd03152e166aa639131 (diff)
downloadlinux-c78f59d7145e7f729c8df58fa7f99ecf66225ddc.tar.xz
mtd: use DEFINE_SHOW_ATTRIBUTE() instead of open-coding it
DEFINE_SHOW_ATTRIBUTE macro can help us simplify the code, so change to it. And change the DEBUGFS_RO_ATTR macro defined in some file to a standard macro. Signed-off-by: Yangtao Li <tiny.windzz@gmail.com> Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
Diffstat (limited to 'drivers/mtd/devices/docg3.h')
-rw-r--r--drivers/mtd/devices/docg3.h11
1 files changed, 0 insertions, 11 deletions
diff --git a/drivers/mtd/devices/docg3.h b/drivers/mtd/devices/docg3.h
index e99946575398..e16dca23655b 100644
--- a/drivers/mtd/devices/docg3.h
+++ b/drivers/mtd/devices/docg3.h
@@ -317,17 +317,6 @@ struct docg3 {
#define doc_info(fmt, arg...) dev_info(docg3->dev, (fmt), ## arg)
#define doc_dbg(fmt, arg...) dev_dbg(docg3->dev, (fmt), ## arg)
#define doc_vdbg(fmt, arg...) dev_vdbg(docg3->dev, (fmt), ## arg)
-
-#define DEBUGFS_RO_ATTR(name, show_fct) \
- static int name##_open(struct inode *inode, struct file *file) \
- { return single_open(file, show_fct, inode->i_private); } \
- static const struct file_operations name##_fops = { \
- .owner = THIS_MODULE, \
- .open = name##_open, \
- .llseek = seq_lseek, \
- .read = seq_read, \
- .release = single_release \
- };
#endif
/*