Skip to content

Commit ec090a0

Browse files
ambarusmiquelraynal
authored andcommitted
mtd: core: Remove partid and partname debugfs files
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
1 parent d9a1683 commit ec090a0

2 files changed

Lines changed: 1 addition & 37 deletions

File tree

drivers/mtd/mtdcore.c

Lines changed: 1 addition & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -336,28 +336,6 @@ static const struct device_type mtd_devtype = {
336336
.release = mtd_release,
337337
};
338338

339-
static int mtd_partid_debug_show(struct seq_file *s, void *p)
340-
{
341-
struct mtd_info *mtd = s->private;
342-
343-
seq_printf(s, "%s\n", mtd->dbg.partid);
344-
345-
return 0;
346-
}
347-
348-
DEFINE_SHOW_ATTRIBUTE(mtd_partid_debug);
349-
350-
static int mtd_partname_debug_show(struct seq_file *s, void *p)
351-
{
352-
struct mtd_info *mtd = s->private;
353-
354-
seq_printf(s, "%s\n", mtd->dbg.partname);
355-
356-
return 0;
357-
}
358-
359-
DEFINE_SHOW_ATTRIBUTE(mtd_partname_debug);
360-
361339
static bool mtd_expert_analysis_mode;
362340

363341
#ifdef CONFIG_DEBUG_FS
@@ -377,23 +355,12 @@ static struct dentry *dfs_dir_mtd;
377355

378356
static void mtd_debugfs_populate(struct mtd_info *mtd)
379357
{
380-
struct mtd_info *master = mtd_get_master(mtd);
381358
struct device *dev = &mtd->dev;
382-
struct dentry *root;
383359

384360
if (IS_ERR_OR_NULL(dfs_dir_mtd))
385361
return;
386362

387-
root = debugfs_create_dir(dev_name(dev), dfs_dir_mtd);
388-
mtd->dbg.dfs_dir = root;
389-
390-
if (master->dbg.partid)
391-
debugfs_create_file("partid", 0400, root, master,
392-
&mtd_partid_debug_fops);
393-
394-
if (master->dbg.partname)
395-
debugfs_create_file("partname", 0400, root, master,
396-
&mtd_partname_debug_fops);
363+
mtd->dbg.dfs_dir = debugfs_create_dir(dev_name(dev), dfs_dir_mtd);
397364
}
398365

399366
#ifndef CONFIG_MMU

include/linux/mtd/mtd.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -188,9 +188,6 @@ struct module; /* only needed for owner field in mtd_info */
188188
*/
189189
struct mtd_debug_info {
190190
struct dentry *dfs_dir;
191-
192-
const char *partname;
193-
const char *partid;
194191
};
195192

196193
/**

0 commit comments

Comments
 (0)