]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
mtd: core: Remove partid and partname debugfs files
authorTudor Ambarus <tudor.ambarus@microchip.com>
Fri, 25 Feb 2022 14:46:56 +0000 (16:46 +0200)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Mon, 14 Mar 2022 16:01:58 +0000 (17:01 +0100)
partid and partname debugfs files were used just by SPI NOR, but they were
replaced by sysfs entries. Since these debugfs files are no longer used in
mtd, remove dead code. The directory is kept as it is used by nandsim,
mtdswap and docg3.

Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Reviewed-by: Pratyush Yadav <p.yadav@ti.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20220225144656.634682-1-tudor.ambarus@microchip.com
drivers/mtd/mtdcore.c
include/linux/mtd/mtd.h

index 1e7f3bbf847eb70cbd5469f4d17c9451cd52f0e1..7dd105daf19d84d0c662879943666a7eef22a9e9 100644 (file)
@@ -336,28 +336,6 @@ static const struct device_type mtd_devtype = {
        .release        = mtd_release,
 };
 
-static int mtd_partid_debug_show(struct seq_file *s, void *p)
-{
-       struct mtd_info *mtd = s->private;
-
-       seq_printf(s, "%s\n", mtd->dbg.partid);
-
-       return 0;
-}
-
-DEFINE_SHOW_ATTRIBUTE(mtd_partid_debug);
-
-static int mtd_partname_debug_show(struct seq_file *s, void *p)
-{
-       struct mtd_info *mtd = s->private;
-
-       seq_printf(s, "%s\n", mtd->dbg.partname);
-
-       return 0;
-}
-
-DEFINE_SHOW_ATTRIBUTE(mtd_partname_debug);
-
 static bool mtd_expert_analysis_mode;
 
 #ifdef CONFIG_DEBUG_FS
@@ -377,23 +355,12 @@ static struct dentry *dfs_dir_mtd;
 
 static void mtd_debugfs_populate(struct mtd_info *mtd)
 {
-       struct mtd_info *master = mtd_get_master(mtd);
        struct device *dev = &mtd->dev;
-       struct dentry *root;
 
        if (IS_ERR_OR_NULL(dfs_dir_mtd))
                return;
 
-       root = debugfs_create_dir(dev_name(dev), dfs_dir_mtd);
-       mtd->dbg.dfs_dir = root;
-
-       if (master->dbg.partid)
-               debugfs_create_file("partid", 0400, root, master,
-                                   &mtd_partid_debug_fops);
-
-       if (master->dbg.partname)
-               debugfs_create_file("partname", 0400, root, master,
-                                   &mtd_partname_debug_fops);
+       mtd->dbg.dfs_dir = debugfs_create_dir(dev_name(dev), dfs_dir_mtd);
 }
 
 #ifndef CONFIG_MMU
index 1b3fc8c71ab3e20c2d1889840eb4871c1f571245..151607e9d64ad0d9f9a2c46849f93591f8a777b0 100644 (file)
@@ -188,9 +188,6 @@ struct module;      /* only needed for owner field in mtd_info */
  */
 struct mtd_debug_info {
        struct dentry *dfs_dir;
-
-       const char *partname;
-       const char *partid;
 };
 
 /**