소스 검색

Merge branch 'master' of git://git.denx.de/u-boot-cfi-flash

Wolfgang Denk 16 년 전
부모
커밋
181c3e46f8
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      drivers/mtd/cfi_flash.c

+ 3 - 1
drivers/mtd/cfi_flash.c

@@ -2009,7 +2009,9 @@ unsigned long flash_init (void)
 #endif
 
 #ifdef CONFIG_SYS_FLASH_PROTECTION
-	char *s = getenv("unlock");
+	/* read environment from EEPROM */
+	char s[64];
+	getenv_r ("unlock", s, sizeof(s));
 #endif
 
 #define BANK_BASE(i)	(((phys_addr_t [CFI_MAX_FLASH_BANKS])CONFIG_SYS_FLASH_BANKS_LIST)[i])