dev_mem: Fix config judgment
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
This commit is contained in:
parent
3c0befbdbd
commit
6013591cb1
|
@ -218,7 +218,8 @@ int devmem_register(void)
|
|||
return -ENOMEM;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_BOARD_MEMORY_RANGE
|
||||
if (CONFIG_BOARD_MEMORY_RANGE[0] != '\0')
|
||||
{
|
||||
len = parse_memory_region(CONFIG_BOARD_MEMORY_RANGE, region,
|
||||
DEVMEM_REGION - 1);
|
||||
if (len < 0)
|
||||
|
@ -226,7 +227,9 @@ int devmem_register(void)
|
|||
kmm_free(region);
|
||||
return len;
|
||||
}
|
||||
#else
|
||||
}
|
||||
else
|
||||
{
|
||||
if (len + (4 - merge) > DEVMEM_REGION)
|
||||
{
|
||||
len = DEVMEM_REGION - (4 - merge);
|
||||
|
@ -249,7 +252,7 @@ int devmem_register(void)
|
|||
region[len].start = (uintptr_t)_sbss;
|
||||
region[len++].end = (uintptr_t)_ebss;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/* register the new MEM driver */
|
||||
|
||||
|
|
Loading…
Reference in New Issue