mtd: core: Check devicetree alias for index
authorVincent Whitchurch <vincent.whitchurch@axis.com>
Tue, 12 Apr 2022 13:52:59 +0000 (15:52 +0200)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Mon, 25 Apr 2022 08:37:49 +0000 (10:37 +0200)
commit82e214f6c0f16827ea7a95b8f96c651a7a7f8ac1
treee72f2034ac652fe3040fbebc0fc92c41a7776f4d
parent9547c4e74f6b4b56c2f9e4e7a286ce126fd333fa
mtd: core: Check devicetree alias for index

Allow the MTD index to be specified via a devicetree alias, so that the
number does not just depend on probe order.  This is useful to allow
pseudo-devices like phram to be optionally used on systems, without
having this affect the numbering of the real hardware MTD devices.

Signed-off-by: Vincent Whitchurch <vincent.whitchurch@axis.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20220412135302.1682890-2-vincent.whitchurch@axis.com
drivers/mtd/mtdcore.c