]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
dm: ofnode: change return type of dev_read_prop() to opaque pointer
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Mon, 17 Jul 2017 03:18:39 +0000 (12:18 +0900)
committerSimon Glass <sjg@chromium.org>
Fri, 28 Jul 2017 18:02:47 +0000 (12:02 -0600)
DT property values can be strings as well as integers.  This is why
of_get_property/fdt_getprop returns an opaque pointer.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Simon Glass <sjg@chromium.org>
drivers/core/read.c
include/dm/read.h

index eafe727f037391efa4aeb47ee7aa6af91647c226..85705836938cf61d202fe15808918095f7fbe228 100644 (file)
@@ -114,7 +114,7 @@ int dev_read_phandle(struct udevice *dev)
                return fdt_get_phandle(gd->fdt_blob, ofnode_to_offset(node));
 }
 
-const u32 *dev_read_prop(struct udevice *dev, const char *propname, int *lenp)
+const void *dev_read_prop(struct udevice *dev, const char *propname, int *lenp)
 {
        return ofnode_get_property(dev_ofnode(dev), propname, lenp);
 }
index b86a2f5feceb862967e912519003ff900a641b16..edf468fdd1958364e7695a5797cb8ee6e7dfbaad 100644 (file)
@@ -266,7 +266,7 @@ int dev_read_phandle(struct udevice *dev);
  * @lenp: place to put length on success
  * @return pointer to property, or NULL if not found
  */
-const u32 *dev_read_prop(struct udevice *dev, const char *propname, int *lenp);
+const void *dev_read_prop(struct udevice *dev, const char *propname, int *lenp);
 
 /**
  * dev_read_alias_seq() - Get the alias sequence number of a node
@@ -443,8 +443,8 @@ static inline int dev_read_phandle(struct udevice *dev)
        return fdt_get_phandle(gd->fdt_blob, dev_of_offset(dev));
 }
 
-static inline const u32 *dev_read_prop(struct udevice *dev,
-                                      const char *propname, int *lenp)
+static inline const void *dev_read_prop(struct udevice *dev,
+                                       const char *propname, int *lenp)
 {
        return ofnode_get_property(dev_ofnode(dev), propname, lenp);
 }