s5j/sflash: fix compilation error when CONFIG_MTD_PROGMEM is not set
authorEunBong Song <eunb.song@samsung.com>
Thu, 6 Apr 2017 01:29:09 +0000 (10:29 +0900)
committerHeesub Shin <heesub.shin@samsung.com>
Tue, 18 Apr 2017 03:02:08 +0000 (12:02 +0900)
This patch fixes a compilation error at s5j_sflash_init() when
CONFIG_MTD_PROGMEM is disabled, but CONFIG_S5J_SFLASH.

Change-Id: I173cd4a500b2817ed73bf441e38ebb65bff53e96
Signed-off-by: EunBong Song <eunb.song@samsung.com>
os/arch/arm/src/s5j/s5j_sflash.c

index 2e7b70b..bb91e33 100644 (file)
@@ -121,7 +121,6 @@ static void s5j_sflash_set_gpio(void)
 /****************************************************************************
  * Public Functions
  ****************************************************************************/
-#ifdef CONFIG_MTD_PROGMEM
 static void s5j_sflash_disable_wp(void)
 {
        unsigned int sfcon;
@@ -148,6 +147,7 @@ static uint8_t s5j_sflash_read_status(void)
        return getreg8(rRDSR);
 }
 
+#ifdef CONFIG_MTD_PROGMEM
 size_t up_progmem_getaddress(size_t page)
 {
        return CONFIG_S5J_FLASH_BASE + up_progmem_pagesize(page) * page;