diff options
author | Miquel Raynal <miquel.raynal@bootlin.com> | 2022-01-27 12:08:02 +0100 |
---|---|---|
committer | Miquel Raynal <miquel.raynal@bootlin.com> | 2022-01-31 17:18:05 +0100 |
commit | e02dacd3a26d5e5d3913650d3d6d939ebf77fd5c (patch) | |
tree | 0a680372099acf46ddbd10f373a9c7c4f7faaaa3 /drivers/mtd/nand/raw/atmel/pmecc.c | |
parent | 3f26d1bf90ba9bf420e49ec9cdbe13d15c0df7cd (diff) |
mtd: rawnand: Fix misuses of of_match_node()
On non-OF enabled platforms (CONFIG_OF is not set), of_match_node() will
expand to NULL. The of_device_id array pointed by the macro will then be
left unused. Let's mark the array __maybe_unused in this case to prevent
compiler warnings.
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Link: https://lore.kernel.org/linux-mtd/20220127110802.1064963-1-miquel.raynal@bootlin.com
Diffstat (limited to 'drivers/mtd/nand/raw/atmel/pmecc.c')
-rw-r--r-- | drivers/mtd/nand/raw/atmel/pmecc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/nand/raw/atmel/pmecc.c b/drivers/mtd/nand/raw/atmel/pmecc.c index 43ebd78816c0..4d7dc8a9c373 100644 --- a/drivers/mtd/nand/raw/atmel/pmecc.c +++ b/drivers/mtd/nand/raw/atmel/pmecc.c @@ -920,7 +920,7 @@ static struct atmel_pmecc_caps sama5d2_caps = { .correct_erased_chunks = true, }; -static const struct of_device_id atmel_pmecc_legacy_match[] = { +static const struct of_device_id __maybe_unused atmel_pmecc_legacy_match[] = { { .compatible = "atmel,sama5d4-nand", &sama5d4_caps }, { .compatible = "atmel,sama5d2-nand", &sama5d2_caps }, { /* sentinel */ } |