Re: [PATCH 2/4] sandbox: only access of_add_memory_bank if it's defined

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Holger,

can you please check if this is also a solution for this?

diff --git a/include/of.h b/include/of.h
index e6993fd..76845e7 100644
--- a/include/of.h
+++ b/include/of.h
@@ -227,7 +227,14 @@ int of_parse_partitions(struct cdev *cdev, struct device_node *node);
 int of_device_is_stdout_path(struct device_d *dev);
 const char *of_get_model(void);
 void *of_flatten_dtb(struct device_node *node);
+#ifdef CONFIG_OFTREE_MEM_GENERIC
 int of_add_memory(struct device_node *node, bool dump);
+#else
+static inline int of_add_memory(struct device_node *node, bool dump)
+{
+       return -EINVAL;
+}
+#endif
 void of_add_memory_bank(struct device_node *node, bool dump, int r,
                u64 base, u64 size);
 struct device_d *of_find_device_by_node_path(const char *path);



If this works for you then this is missing. Maybe there are some other related
function which depends on CONFIG_OFTREE_MEM_GENERIC, I didn't check it.

I think this would be a better solution, if it works...

- Alex

_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox




[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux