mtd: create per-device and module-scope debugfs entries
authorMario Rugiero <mrugiero@gmail.com>
Mon, 29 May 2017 11:38:41 +0000 (08:38 -0300)
committerBrian Norris <computersforpeace@gmail.com>
Fri, 21 Jul 2017 20:25:29 +0000 (13:25 -0700)
commite8e3edb95ce6a146bc774b6cfad3553f4383edc8
tree53cc03ba5c33a3feb27ea46cfc61cc979dfe9651
parent5771a8c08880cdca3bfb4a3fc6d309d6bba20877
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>
drivers/mtd/devices/docg3.c
drivers/mtd/devices/docg3.h
drivers/mtd/mtdcore.c
drivers/mtd/mtdswap.c
drivers/mtd/nand/nandsim.c
include/linux/mtd/mtd.h