Skip to content

Fix common bug in most nand drivers not showing a device in sysfs

Alexander Holler linux-mtd lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest27 patches 23 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/27mtd: nand: introduce function to fix a common bug in most nand-drivers not showing a device in sysfsinclude/linux/mtd/mtd.h+10 -111 replies
2/27mtd: nand: orion_nand: show device structure in sysfsdrivers/mtd/nand/orion_nand.c+1 -40 replies
3/27mtd: nand: omap2: show device structure in sysfsdrivers/mtd/nand/omap2.c+1 -20 replies
4/27mtd: nand: atmel_nand: show device structure in sysfsdrivers/mtd/nand/atmel_nand.c+1 -30 replies
5/27mtd: nand: gpio: show device structure in sysfsdrivers/mtd/nand/gpio.c+1 -30 replies
6/27mtd: nand: fsmc: show device structure in sysfsdrivers/mtd/nand/fsmc_nand.c+1 -20 replies
7/27mtd: nand: gpmi: show device structure in sysfsdrivers/mtd/nand/gpmi-nand/gpmi-nand.c+1 -50 replies
8/27mtd: nand: plat: show device structure in sysfsdrivers/mtd/nand/plat_nand.c+1 -20 replies
9/27mtd: nand: pxa3xx: show device structure in sysfsdrivers/mtd/nand/pxa3xx_nand.c+1 -27 replies
10/27mtd: nand: s3c2410: show device structure in sysfsdrivers/mtd/nand/s3c2410.c+1 -20 replies
11/27mtd: nand: sh_flctl: show device structure in sysfsdrivers/mtd/nand/sh_flctl.c+1 -10 replies
12/27mtd: nand: sharpsl: show device structure in sysfsdrivers/mtd/nand/sharpsl.c+1 -60 replies
13/27mtd: nand: tmio: show device structure in sysfsdrivers/mtd/nand/tmio_nand.c+1 -20 replies
14/27mtd: nand: docg4: show device structure in sysfsdrivers/mtd/nand/docg4.c+1 -20 replies
15/27mtd: nand: davinci: use mtd_setup_common_members()drivers/mtd/nand/davinci_nand.c+1 -40 replies
16/27mtd: nand: lpc32xx_mlc: use mtd_setup_common_members()drivers/mtd/nand/lpc32xx_mlc.c+1 -50 replies
17/27mtd: nand: lpc32xx_slc: use mtd_setup_common_members()drivers/mtd/nand/lpc32xx_slc.c+1 -30 replies
18/27mtd: nand: mxc: use mtd_setup_common_members()drivers/mtd/nand/mxc_nand.c+1 -40 replies
19/27mtd: nand: bcm47: show device structure in sysfsdrivers/mtd/nand/bcm47xxnflash/main.c+1 -20 replies
20/27mtd: nand: fsl_elbc: show device structure in sysfsdrivers/mtd/nand/fsl_elbc_nand.c+1 -40 replies
21/27mtd: nand: fsl_upm: show device structure in sysfsdrivers/mtd/nand/fsl_upm.c+1 -30 replies
22/27mtd: nand: fsl_ifc: show device structure in sysfsdrivers/mtd/nand/fsl_ifc_nand.c+1 -40 replies
23/27mtd: nand: jz4740: show device structure in sysfsdrivers/mtd/nand/jz4740_nand.c+1 -30 replies
24/27mtd: nand: mpc5121_nfc: show device structure in sysfsdrivers/mtd/nand/mpc5121_nfc.c+1 -10 replies
25/27mtd: nand: ndfc: show device structure in sysfsdrivers/mtd/nand/ndfc.c+1 -30 replies
26/27mtd: nand: txx9ndfmc: show device structure in sysfsdrivers/mtd/nand/txx9ndfmc.c+1 -30 replies
27/27mtd: nand: socrates: use mtd_setup_common_members()drivers/mtd/nand/socrates_nand.c+1 -40 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 00/27] Fix common bug in most nand drivers not showing a device in sysfs

A comment in mtdcore.c function add_mtd_device() which is called by mtd_device_parse_register() made me wonder:

"Caller should have set dev.parent to match the physical device."

In fact this is not done by most nand drivers.

What follows is a series which fixes this.

Tested: orion and omap2
Compile-Tested: atmel, gpio, fsmc, gpmi, plat, pxa3xx, s3c2410, sh_flctl,
sharpsl, tmio, docg4, davinci, lpc32xx_mlc, lpc32xx_slc, mxc
Not tested at all (only be view, patches 19-27): bcm47, fsl_elbc, fsl_upm,

		fsl_ifc, jz4740, mpc5121m, ndfc, txx9ndfmx, socrates

The overall stat is

27 files changed, 36 insertions(+), 80 deletions(-)

and it fixes 21 of these bugs.

Regards,

Alexander Holler