summaryrefslogtreecommitdiff
path: root/include/linux/mtd
diff options
context:
space:
mode:
authorMario Rugiero <mrugiero@gmail.com>2017-05-29 14:38:41 +0300
committerBrian Norris <computersforpeace@gmail.com>2017-07-21 23:25:29 +0300
commite8e3edb95ce6a146bc774b6cfad3553f4383edc8 (patch)
tree53cc03ba5c33a3feb27ea46cfc61cc979dfe9651 /include/linux/mtd
parent5771a8c08880cdca3bfb4a3fc6d309d6bba20877 (diff)
downloadlinux-e8e3edb95ce6a146bc774b6cfad3553f4383edc8.tar.xz
mtd: create per-device and module-scope debugfs entries
Several MTD devices are using debugfs entries created in the root. This commit provides the means for a standardized subtree, creating one "mtd" entry at root, and one entry per device inside it, named after the device. The tree is registered in add_mtd_device, and released in del_mtd_device. Devices docg3, mtdswap and nandsim were updated to use this subtree instead of custom ones, and their entries were prefixed with the drivers' names. Signed-off-by: Mario J. Rugiero <mrugiero@gmail.com> Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Diffstat (limited to 'include/linux/mtd')
-rw-r--r--include/linux/mtd/mtd.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h
index f8a2ef239c60..6cd0f6b7658b 100644
--- a/include/linux/mtd/mtd.h
+++ b/include/linux/mtd/mtd.h
@@ -206,6 +206,15 @@ struct mtd_pairing_scheme {
struct module; /* only needed for owner field in mtd_info */
+/**
+ * struct mtd_debug_info - debugging information for an MTD device.
+ *
+ * @dfs_dir: direntry object of the MTD device debugfs directory
+ */
+struct mtd_debug_info {
+ struct dentry *dfs_dir;
+};
+
struct mtd_info {
u_char type;
uint32_t flags;
@@ -346,6 +355,7 @@ struct mtd_info {
struct module *owner;
struct device dev;
int usecount;
+ struct mtd_debug_info dbg;
};
int mtd_ooblayout_ecc(struct mtd_info *mtd, int section,