summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorRoger Quadros <rogerq@kernel.org>2023-12-07 16:15:08 +0200
committerFrancesco Dolcini <francesco.dolcini@toradex.com>2024-03-21 14:26:33 +0000
commit23e2e6b10903cae9cd1f137cd2f6dfc5eabb240c (patch)
tree1e0126fb9cf36b2457fa368106d1ab0d0559255f /drivers
parent30d95b256314ed803d7c91be8b06280700e92786 (diff)
mtd: rawnand: omap_elm: Fix elm_init definition
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mtd/nand/raw/omap_elm.c4
-rw-r--r--drivers/mtd/nand/raw/omap_elm.h6
2 files changed, 2 insertions, 8 deletions
diff --git a/drivers/mtd/nand/raw/omap_elm.c b/drivers/mtd/nand/raw/omap_elm.c
index 35a066df41..0e4954a051 100644
--- a/drivers/mtd/nand/raw/omap_elm.c
+++ b/drivers/mtd/nand/raw/omap_elm.c
@@ -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
+}
#ifdef CONFIG_SYS_NAND_SELF_INIT
static int elm_probe(struct udevice *dev)
diff --git a/drivers/mtd/nand/raw/omap_elm.h b/drivers/mtd/nand/raw/omap_elm.h
index a7f7bacb15..f3db00d55d 100644
--- a/drivers/mtd/nand/raw/omap_elm.h
+++ b/drivers/mtd/nand/raw/omap_elm.h
@@ -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 */