When building the pxa3xx defconfig without device tree support
(i.e. the pxa3xx_defconfig) the build fails like this:

drivers/mtd/nand/pxa3xx_nand.c: In function ‘pxa3xx_nand_probe’:
drivers/mtd/nand/pxa3xx_nand.c:1325:2: error: implicit declaration of function 
‘pxa3xx_nand_get_variant’ [-Werror=implicit-function-declaration]
  info->variant = pxa3xx_nand_get_variant(pdev);
  ^
cc1: some warnings being treated as errors
make[5]: *** [drivers/mtd/nand/pxa3xx_nand.o] Error 1
make[4]: *** [drivers/mtd/nand] Error 2
make[4]: *** Waiting for unfinished jobs....

Fix it up by returning the PXA variant on non-DT boots.

This appears to have been broken since
commit c0f3b8643a6fa2461d70760ec49d21d2b031d611
"mtd: nand: pxa3xx: Introduce 'marvell,armada370-nand' compatible string"

Cc: [email protected]
Cc: Ezequiel Garcia <[email protected]>
Cc: Daniel Mack <[email protected]>
Cc: Brian Norris <[email protected]>
Cc: David Woodhouse <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
---
 drivers/mtd/nand/pxa3xx_nand.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/mtd/nand/pxa3xx_nand.c b/drivers/mtd/nand/pxa3xx_nand.c
index 5db900d..e7a403f 100644
--- a/drivers/mtd/nand/pxa3xx_nand.c
+++ b/drivers/mtd/nand/pxa3xx_nand.c
@@ -1285,6 +1285,12 @@ static int pxa3xx_nand_probe_dt(struct platform_device 
*pdev)
        return 0;
 }
 #else
+static enum pxa3xx_nand_variant
+pxa3xx_nand_get_variant(struct platform_device *pdev)
+{
+       return PXA3XX_NAND_VARIANT_PXA;
+}
+
 static inline int pxa3xx_nand_probe_dt(struct platform_device *pdev)
 {
        return 0;
-- 
1.8.3.1

--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to