aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand/raw/atmel/nand-controller.c
diff options
context:
space:
mode:
authorMiquel Raynal <[email protected]>2022-01-27 11:08:02 +0000
committerMiquel Raynal <[email protected]>2022-01-31 16:18:05 +0000
commite02dacd3a26d5e5d3913650d3d6d939ebf77fd5c (patch)
tree0a680372099acf46ddbd10f373a9c7c4f7faaaa3 /drivers/mtd/nand/raw/atmel/nand-controller.c
parentmtd: Fix misuses of of_match_ptr() (diff)
downloadkernel-e02dacd3a26d5e5d3913650d3d6d939ebf77fd5c.tar.gz
kernel-e02dacd3a26d5e5d3913650d3d6d939ebf77fd5c.zip
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 <[email protected]> Acked-by: Florian Fainelli <[email protected]> Link: https://lore.kernel.org/linux-mtd/[email protected]
Diffstat (limited to 'drivers/mtd/nand/raw/atmel/nand-controller.c')
-rw-r--r--drivers/mtd/nand/raw/atmel/nand-controller.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/nand/raw/atmel/nand-controller.c b/drivers/mtd/nand/raw/atmel/nand-controller.c
index 4ecbaccf5526..0209f7462635 100644
--- a/drivers/mtd/nand/raw/atmel/nand-controller.c
+++ b/drivers/mtd/nand/raw/atmel/nand-controller.c
@@ -1938,7 +1938,7 @@ static const struct atmel_smc_nand_ebi_csa_cfg sam9x60_ebi_csa = {
.nfd0_on_d16 = AT91_SFR_CCFG_NFD0_ON_D16,
};
-static const struct of_device_id atmel_ebi_csa_regmap_of_ids[] = {
+static const struct of_device_id __maybe_unused atmel_ebi_csa_regmap_of_ids[] = {
{
.compatible = "atmel,at91sam9260-matrix",
.data = &at91sam9260_ebi_csa,