aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd
diff options
context:
space:
mode:
authorTudor Ambarus <tudor.ambarus@microchip.com>2021-12-17 14:26:35 +0200
committerTudor Ambarus <tudor.ambarus@microchip.com>2021-12-29 10:22:14 +0200
commit5f340402bbfc1ee75e7b62b98f6ad85e14ce587c (patch)
tree8c878072a1e578206eceb150f4761652e155d930 /drivers/mtd
parentmtd: spi-nor: micron-st: write 2 bytes when disabling Octal DTR mode (diff)
downloadlinux-dev-5f340402bbfc1ee75e7b62b98f6ad85e14ce587c.tar.xz
linux-dev-5f340402bbfc1ee75e7b62b98f6ad85e14ce587c.zip
mtd: spi-nor: Remove debugfs entries that duplicate sysfs entries
SPI NOR sysfs defines partname and jedec_id device attributes, which duplicate the information from debugfs. Since the sysfs directory structure and the attributes in each directory define an ABI between the kernel and user space, thus it can never be removed, remove the debugfs entries so that we don't duplicate the information. Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com> Reviewed-by: Pratyush Yadav <p.yadav@ti.com> Link: https://lore.kernel.org/r/20211217122636.474976-2-tudor.ambarus@microchip.com
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/spi-nor/core.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/drivers/mtd/spi-nor/core.c b/drivers/mtd/spi-nor/core.c
index 84a21b5045b3..04ea180118e3 100644
--- a/drivers/mtd/spi-nor/core.c
+++ b/drivers/mtd/spi-nor/core.c
@@ -3126,16 +3126,6 @@ static const struct flash_info *spi_nor_match_id(struct spi_nor *nor,
return NULL;
}
-static void spi_nor_debugfs_init(struct spi_nor *nor,
- const struct flash_info *info)
-{
- struct mtd_info *mtd = &nor->mtd;
-
- mtd->dbg.partname = info->name;
- mtd->dbg.partid = devm_kasprintf(nor->dev, GFP_KERNEL, "spi-nor:%*phN",
- info->id_len, info->id);
-}
-
static const struct flash_info *spi_nor_get_flash_info(struct spi_nor *nor,
const char *name)
{
@@ -3243,8 +3233,6 @@ int spi_nor_scan(struct spi_nor *nor, const char *name,
nor->info = info;
- spi_nor_debugfs_init(nor, info);
-
mutex_init(&nor->lock);
/* Init flash parameters based on flash_info struct and SFDP */