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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 31 Dec 2022 12:32:13 +0000 (13:32 +0100)
commit58701a96062faaedd86a42c1a195c11d000a7267
tree65a6f75d450491f219322d6706c2493913362051
parentd24fd986ae9d40fe3fcea0c1d7c44605b3527ca4
mtd: spi-nor: hide jedec_id sysfs attribute if not present

[ Upstream commit 7d388551b6888f3725e6c957f472526b35161a5b ]

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
Signed-off-by: Sasha Levin <sashal@kernel.org>
Documentation/ABI/testing/sysfs-bus-spi-devices-spi-nor
drivers/mtd/spi-nor/sysfs.c