]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
mtd: rawnand: omap_elm: Fix elm_init definition
authorRoger Quadros <rogerq@kernel.org>
Mon, 11 Dec 2023 11:46:00 +0000 (13:46 +0200)
committerDario Binacchi <dario.binacchi@amarulasolutions.com>
Mon, 15 Jan 2024 07:58:24 +0000 (08:58 +0100)
The macro ELM_BASE is defined in mach/hardware.h and is
not visible at the omap_elm.h header file. Avoid using it
in omap_elm.h.

Reported-by: Hong Guan <hguan@ti.com>
Fixes: 7363cf0581a3 ("mtd: rawnand: omap_elm: u-boot driver model support")
Signed-off-by: Roger Quadros <rogerq@kernel.org>
Link: https://lore.kernel.org/all/20231211114600.4414-3-rogerq@kernel.org
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
drivers/mtd/nand/raw/omap_elm.c
drivers/mtd/nand/raw/omap_elm.h

index 56a2c39e4f63894b25c5dac3c82f1ccec82d5213..015ec9bc2de0179c954e8097aec87a61cc3d76bd 100644 (file)
@@ -185,7 +185,6 @@ void elm_reset(void)
                ;
 }
 
-#ifdef ELM_BASE
 /**
  * elm_init - Initialize ELM module
  *
@@ -194,10 +193,11 @@ void elm_reset(void)
  */
 void elm_init(void)
 {
+#ifdef ELM_BASE
        elm_cfg = (struct elm *)ELM_BASE;
        elm_reset();
-}
 #endif
+}
 
 #if CONFIG_IS_ENABLED(SYS_NAND_SELF_INIT)
 
index a7f7bacb15488481d7c5105e7a2a57a93864b519..f3db00d55de30601aff0f07d89340d9fa0e4b0c2 100644 (file)
@@ -74,12 +74,6 @@ int elm_check_error(u8 *syndrome, enum bch_level bch_type, u32 *error_count,
                u32 *error_locations);
 int elm_config(enum bch_level level);
 void elm_reset(void);
-#ifdef ELM_BASE
 void elm_init(void);
-#else
-static inline void elm_init(void)
-{
-}
-#endif
 #endif /* __ASSEMBLY__ */
 #endif /* __ASM_ARCH_ELM_H */