mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 21:59:12 -04:00
of: reserved-memory: Bypass rmem initialization check for carveouts
Pure carveouts (i.e. memory that is completely unmanaged by the kernel) do not have any initialization routines associated with them. So, ignore them when checking if a region has already been initialized by the reserved memory framework. Change-Id: Ied0db066a372751f40327460e583a81ad5b5429f Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
This commit is contained in:
parent
6d73fbad77
commit
e058371a0b
1 changed files with 6 additions and 1 deletions
|
|
@ -404,6 +404,7 @@ bool of_reserved_mem_device_is_init(struct device *dev)
|
|||
{
|
||||
struct device_node *mem_dev_node;
|
||||
struct rmem_assigned_device *rd;
|
||||
struct reserved_mem *rmem;
|
||||
bool ret = false;
|
||||
|
||||
if (!dev->of_node)
|
||||
|
|
@ -413,7 +414,11 @@ bool of_reserved_mem_device_is_init(struct device *dev)
|
|||
if (!mem_dev_node)
|
||||
return true;
|
||||
|
||||
if (!of_device_is_available(mem_dev_node) || !__find_rmem(mem_dev_node))
|
||||
if (!of_device_is_available(mem_dev_node))
|
||||
goto exit;
|
||||
|
||||
rmem = __find_rmem(mem_dev_node);
|
||||
if (!rmem || !rmem->ops)
|
||||
goto exit;
|
||||
of_node_put(mem_dev_node);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue