linux/drivers/mtd/devices
Boris Brezillon 1530578abd mtd: Avoid probe failures when mtd->dbg.dfs_dir is invalid
Commit e8e3edb95c ("mtd: create per-device and module-scope debugfs
entries") tried to make MTD related debugfs stuff consistent across the
MTD framework by creating a root <debugfs>/mtd/ directory containing
one directory per MTD device.

The problem is that, by default, the MTD layer only registers the
master device if no partitions are defined for this master. This
behavior breaks all drivers that expect mtd->dbg.dfs_dir to be filled
correctly after calling mtd_device_register() in order to add their own
debugfs entries.

The only way we can force all MTD masters to be registered no matter if
they expose partitions or not is by enabling the
CONFIG_MTD_PARTITIONED_MASTER option.

In such situations, there's no other solution but to accept skipping
debugfs initialization when dbg.dfs_dir is invalid, and when this
happens, inform the user that he should consider enabling
CONFIG_MTD_PARTITIONED_MASTER.

Fixes: e8e3edb95c ("mtd: create per-device and module-scope debugfs entries")
Cc: <stable@vger.kernel.org>
Cc: Mario J. Rugiero <mrugiero@gmail.com>
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Reported-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Richard Weinberger <richard@nod.at>
2017-11-13 22:07:31 +01:00
..
bcm47xxsflash.c mtd: bcm47xxsflash: support reading flash out of mapping window 2017-02-08 15:07:59 -08:00
bcm47xxsflash.h mtd: bcm47xxsflash: support reading flash out of mapping window 2017-02-08 15:07:59 -08:00
block2mtd.c mm, fs: get rid of PAGE_CACHE_* and page_cache_{get,release} macros 2016-04-04 10:41:08 -07:00
docg3.c mtd: Avoid probe failures when mtd->dbg.dfs_dir is invalid 2017-11-13 22:07:31 +01:00
docg3.h mtd: create per-device and module-scope debugfs entries 2017-07-21 13:25:29 -07:00
Kconfig mtd: mchp23k256: Add driver for this SPI SRAM device 2017-05-11 10:13:02 -07:00
lart.c mtd: constify mtd_partition 2017-11-06 23:26:01 +01:00
m25p80.c mtd: spi-nor: Add support for mr25h128 2017-10-29 20:57:19 +01:00
Makefile mtd: mchp23k256: Add driver for this SPI SRAM device 2017-05-11 10:13:02 -07:00
mchp23k256.c mtd: mchp23k256: Add support for mchp23lcv1024 2017-06-08 16:32:11 -07:00
ms02-nv.c
ms02-nv.h
mtd_dataflash.c mtd: dataflash: Add flash_info for AT45DB641E 2017-05-11 10:04:52 -07:00
mtdram.c mtd: remove the get_unmapped_area method 2017-11-13 21:39:18 +01:00
phram.c
pmc551.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
powernv_flash.c powerpc/opal: Add inline function to get rc from an ASYNC_COMP opal_msg 2016-06-29 17:33:18 +10:00
serial_flash_cmds.h mtd: st_spi_fsm: remove SPINOR_OP_RDSR2 and use SPINOR_OP_RDCR instead 2017-06-27 21:50:17 +02:00
slram.c mtd: slram: use memremap() instead of ioremap() 2017-11-13 21:39:16 +01:00
spear_smi.c mtd: spear_smi: add NULL check on devm_kzalloc() return value 2017-08-15 14:00:42 +02:00
sst25l.c MTD updates for 4.4-rc1: 2015-11-06 11:50:24 -08:00
st_spi_fsm.c mtd: st_spi_fsm: Handle clk_prepare_enable/clk_disable_unprepare. 2017-08-23 16:49:20 +02:00