svn commit: r281371 - head/sys/dev/fdt
Ian Lepore
ian at FreeBSD.org
Fri Apr 10 13:50:58 UTC 2015
Author: ian
Date: Fri Apr 10 13:50:57 2015
New Revision: 281371
URL: https://svnweb.freebsd.org/changeset/base/281371
Log:
Use OF_getencpropalloc() to handle endianess of the properties.
Submitted by: Michal Meloun
Modified:
head/sys/dev/fdt/fdt_pinctrl.c
Modified: head/sys/dev/fdt/fdt_pinctrl.c
==============================================================================
--- head/sys/dev/fdt/fdt_pinctrl.c Fri Apr 10 13:28:01 2015 (r281370)
+++ head/sys/dev/fdt/fdt_pinctrl.c Fri Apr 10 13:50:57 2015 (r281371)
@@ -46,7 +46,7 @@ fdt_pinctrl_configure(device_t client, u
char name[16];
snprintf(name, sizeof(name), "pinctrl-%u", index);
- nconfigs = OF_getprop_alloc(ofw_bus_get_node(client), name,
+ nconfigs = OF_getencprop_alloc(ofw_bus_get_node(client), name,
sizeof(*configs), (void **)&configs);
if (nconfigs < 0)
return (ENOENT);
@@ -122,12 +122,12 @@ pinctrl_configure_children(device_t pinc
if (!fdt_is_enabled(node))
continue;
pinctrl_configure_children(pinctrl, node);
- nconfigs = OF_getencprop_alloc(node, "pinctrl-0",
+ nconfigs = OF_getencprop_alloc(node, "pinctrl-0",
sizeof(*configs), (void **)&configs);
if (nconfigs <= 0)
continue;
if (bootverbose) {
- char name[32];
+ char name[32];
OF_getprop(node, "name", &name, sizeof(name));
printf("Processing %d pin-config node(s) in pinctrl-0 for %s\n",
nconfigs, name);
More information about the svn-src-head
mailing list