mirror of
https://github.com/torvalds/linux.git
synced 2024-12-21 10:31:54 +00:00
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
This commit is contained in:
parent
3f26d1bf90
commit
e02dacd3a2
@ -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,
|
||||
|
@ -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 */ }
|
||||
|
@ -2914,7 +2914,7 @@ const struct dev_pm_ops brcmnand_pm_ops = {
|
||||
};
|
||||
EXPORT_SYMBOL_GPL(brcmnand_pm_ops);
|
||||
|
||||
static const struct of_device_id brcmnand_of_match[] = {
|
||||
static const struct of_device_id __maybe_unused brcmnand_of_match[] = {
|
||||
{ .compatible = "brcm,brcmnand-v2.1" },
|
||||
{ .compatible = "brcm,brcmnand-v2.2" },
|
||||
{ .compatible = "brcm,brcmnand-v4.0" },
|
||||
|
Loading…
Reference in New Issue
Block a user