ARM: UniPhier: leave the last element of boot_device_table empty

Checking if the pointer is NULL would be easier to know the tail
of the boot_device_table[] array.
For clarification, add the /* sentinel */ comment.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
This commit is contained in:
Masahiro Yamada 2015-02-05 20:56:24 +09:00
parent 4431684910
commit 4e79908044
2 changed files with 2 additions and 2 deletions

View File

@ -19,7 +19,7 @@ static int do_pinmon(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
puts("Boot Mode Pin:\n");
for (i = 0; strlen(boot_device_table[i].info); i++)
for (i = 0; boot_device_table[i].info; i++)
printf(" %c %02x %s\n", i == mode_sel ? '*' : ' ', i,
boot_device_table[i].info);

View File

@ -45,7 +45,7 @@ struct boot_device_info boot_device_table[] = {
{BOOT_DEVICE_NONE, "Reserved"},
{BOOT_DEVICE_NONE, "Reserved"},
{BOOT_DEVICE_NONE, "Reserved"},
{BOOT_DEVICE_NONE, ""}
{ /* sentinel */ }
};
int get_boot_mode_sel(void)