소스 검색

microblaze: Use getenv_ulong() in place of getenv(), strtoul

This changes the board code to use the new getenv_ulong() function.

Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass 13 년 전
부모
커밋
94e4dae9fa
1개의 변경된 파일2개의 추가작업 그리고 3개의 파일을 삭제
  1. 2 3
      arch/microblaze/lib/board.c

+ 2 - 3
arch/microblaze/lib/board.c

@@ -172,9 +172,8 @@ void board_init (void)
 	/* Initialize the console (after the relocation and devices init) */
 	console_init_r();
 
-	if ((s = getenv ("loadaddr")) != NULL) {
-		load_addr = simple_strtoul (s, NULL, 16);
-	}
+	/* Initialize from environment */
+	load_addr = getenv_ulong("loadaddr", 16, load_addr);
 
 #if defined(CONFIG_CMD_NET)
 	/* IP Address */