mtd: spi-nor: hide jedec_id sysfs attribute if not present
authorMichael Walle <michael@walle.cc>
Wed, 10 Aug 2022 22:06:48 +0000 (00:06 +0200)
committerTudor Ambarus <tudor.ambarus@microchip.com>
Mon, 21 Nov 2022 13:37:15 +0000 (15:37 +0200)
commit7d388551b6888f3725e6c957f472526b35161a5b
treefb31d618e80885d8c7e478032dfa644fa5abd3c4
parent2ebc336be08160debfe27f87660cf550d710f3e9
mtd: spi-nor: hide jedec_id sysfs attribute if not present

Some non-jedec compliant flashes (like the Everspin flashes) don't have
an ID at all. Hide the attribute in this case.

Fixes: 36ac02286265 ("mtd: spi-nor: add initial sysfs support")
Signed-off-by: Michael Walle <michael@walle.cc>
Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Reviewed-by: Takahiro Kuwano <Takahiro.Kuwano@infineon.com>
Link: https://lore.kernel.org/r/20220810220654.1297699-2-michael@walle.cc
Documentation/ABI/testing/sysfs-bus-spi-devices-spi-nor
drivers/mtd/spi-nor/sysfs.c