From: Jan Luebbe <jlu@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 2/2] fdt: of_unflatten_dtb can work on const data
Date: Wed, 3 Dec 2014 15:34:00 +0100 [thread overview]
Message-ID: <1417617240-16852-2-git-send-email-jlu@pengutronix.de> (raw)
In-Reply-To: <1417617240-16852-1-git-send-email-jlu@pengutronix.de>
Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
---
drivers/of/fdt.c | 4 ++--
include/of.h | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
index cfe183350978..89f291787962 100644
--- a/drivers/of/fdt.c
+++ b/drivers/of/fdt.c
@@ -54,7 +54,7 @@ static inline char *dt_string(struct fdt_header *f, char *strstart, uint32_t ofs
* Parse a flat device tree binary blob and return a pointer to the
* unflattened tree.
*/
-struct device_node *of_unflatten_dtb(void *infdt)
+struct device_node *of_unflatten_dtb(const void *infdt)
{
const void *nodep; /* property node pointer */
uint32_t tag; /* tag */
@@ -69,7 +69,7 @@ struct device_node *of_unflatten_dtb(void *infdt)
struct fdt_header f;
int ret;
unsigned int maxlen;
- struct fdt_header *fdt = infdt;
+ const struct fdt_header *fdt = infdt;
if (fdt->magic != cpu_to_fdt32(FDT_MAGIC)) {
pr_err("bad magic: 0x%08x\n", fdt32_to_cpu(fdt->magic));
diff --git a/include/of.h b/include/of.h
index 7b93c58474de..5273f87ebd1d 100644
--- a/include/of.h
+++ b/include/of.h
@@ -98,7 +98,7 @@ void of_print_cmdline(struct device_node *root);
void of_print_nodes(struct device_node *node, int indent);
int of_probe(void);
int of_parse_dtb(struct fdt_header *fdt);
-struct device_node *of_unflatten_dtb(void *fdt);
+struct device_node *of_unflatten_dtb(const void *fdt);
struct cdev;
--
2.1.3
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2014-12-03 14:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-03 14:33 [PATCH 1/2] stringlist: the string argument should be const Jan Luebbe
2014-12-03 14:34 ` Jan Luebbe [this message]
2014-12-04 7:24 ` Sascha Hauer
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=1417617240-16852-2-git-send-email-jlu@pengutronix.de \
--to=jlu@pengutronix.de \
--cc=barebox@lists.infradead.org \
/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