dm: ofnode: change return type of dev_read_prop() to opaque pointer
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>
This commit is contained in:
parent
00b26f7cdb
commit
fd73621cba
@ -114,7 +114,7 @@ int dev_read_phandle(struct udevice *dev)
|
|||||||
return fdt_get_phandle(gd->fdt_blob, ofnode_to_offset(node));
|
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);
|
return ofnode_get_property(dev_ofnode(dev), propname, lenp);
|
||||||
}
|
}
|
||||||
|
@ -266,7 +266,7 @@ int dev_read_phandle(struct udevice *dev);
|
|||||||
* @lenp: place to put length on success
|
* @lenp: place to put length on success
|
||||||
* @return pointer to property, or NULL if not found
|
* @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
|
* 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));
|
return fdt_get_phandle(gd->fdt_blob, dev_of_offset(dev));
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline const u32 *dev_read_prop(struct udevice *dev,
|
static inline const void *dev_read_prop(struct udevice *dev,
|
||||||
const char *propname, int *lenp)
|
const char *propname, int *lenp)
|
||||||
{
|
{
|
||||||
return ofnode_get_property(dev_ofnode(dev), propname, lenp);
|
return ofnode_get_property(dev_ofnode(dev), propname, lenp);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user