From: Puneet Saxena <puneets@nvidia.com>
To: pantelis.antoniou@konsulko.com, frowand.list@gmail.com,
devicetree@vger.kernel.org
Cc: treding@nvidia.com, vdumpa@nvidia.com, snikam@nvidia.com
Subject: [PATCH] of: resered-memory: ignore disabled memory-region nodes
Date: Wed, 22 May 2019 11:05:53 +0530 [thread overview]
Message-ID: <1558503353-13179-2-git-send-email-puneets@nvidia.com> (raw)
In-Reply-To: <1558503353-13179-1-git-send-email-puneets@nvidia.com>
From: Krishna Reddy <vdumpa@nvidia.com>
Ignore disabled nodes in the memory-region nodes list and continue
to initialize the rest of enabled nodes.
Signed-off-by: Krishna Reddy <vdumpa@nvidia.com>
---
drivers/of/of_reserved_mem.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/of/of_reserved_mem.c b/drivers/of/of_reserved_mem.c
index 1977ee0adcb1..58d95d774e3b 100644
--- a/drivers/of/of_reserved_mem.c
+++ b/drivers/of/of_reserved_mem.c
@@ -314,6 +314,7 @@ int of_reserved_mem_device_init_by_idx(struct device *dev,
struct device_node *target;
struct reserved_mem *rmem;
int ret;
+ const char *status;
if (!np || !dev)
return -EINVAL;
@@ -322,6 +323,10 @@ int of_reserved_mem_device_init_by_idx(struct device *dev,
if (!target)
return -ENODEV;
+ status = of_get_property(target, "status", NULL);
+ if (status && strcmp(status, "okay") != 0 && strcmp(status, "ok") != 0)
+ return 0;
+
rmem = __find_rmem(target);
of_node_put(target);
--
2.7.4
next prev parent reply other threads:[~2019-05-22 5:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-22 5:35 [PATCH] ignore disabled memory-region nodes Puneet Saxena
2019-05-22 5:35 ` Puneet Saxena [this message]
2019-05-22 6:38 ` [PATCH] of: resered-memory: " Thierry Reding
2019-05-22 7:21 ` puneet saxena
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1558503353-13179-2-git-send-email-puneets@nvidia.com \
--to=puneets@nvidia.com \
--cc=devicetree@vger.kernel.org \
--cc=frowand.list@gmail.com \
--cc=pantelis.antoniou@konsulko.com \
--cc=snikam@nvidia.com \
--cc=treding@nvidia.com \
--cc=vdumpa@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox