diff options
author | Oleksandr Tymoshenko <gonzo@FreeBSD.org> | 2018-04-09 22:06:16 +0000 |
---|---|---|
committer | Oleksandr Tymoshenko <gonzo@FreeBSD.org> | 2018-04-09 22:06:16 +0000 |
commit | f7604b1b275455fc5506c3c83a4876f567bbc6b3 (patch) | |
tree | 40a5b93b5f618e99153acf0d1ffd93ec763bce3d /sys/arm/ti/ti_pinmux.c | |
parent | c7fb0e1ddf717f58e069fd2339b05370b41df3ce (diff) |
Align OF_getencprop_alloc API with OF_getencprop and OF_getprop_alloc
Change OF_getencprop_alloc semantics to be combination of malloc and
OF_getencprop and return size of the property, not number of elements
allocated.
For the use cases where number of elements is preferred introduce
OF_getencprop_alloc_multi helper function that copies semantics
of OF_getencprop_alloc prior to this change.
This is to make OF_getencprop_alloc and OF_getencprop_alloc_multi
function signatures consistent with OF_getencprop_alloc and
OF_getencprop_alloc_multi.
Functionality-wise this patch is mostly rename of OF_getencprop_alloc
to OF_getencprop_alloc_multi except two calls in ofw_bus_setup_iinfo
where 1 was used as a block size.
Notes
Notes:
svn path=/head/; revision=332341
Diffstat (limited to 'sys/arm/ti/ti_pinmux.c')
-rw-r--r-- | sys/arm/ti/ti_pinmux.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/arm/ti/ti_pinmux.c b/sys/arm/ti/ti_pinmux.c index e102d61611ab..b532d9124ce6 100644 --- a/sys/arm/ti/ti_pinmux.c +++ b/sys/arm/ti/ti_pinmux.c @@ -340,8 +340,8 @@ ti_pinmux_configure_pins(device_t dev, phandle_t cfgxref) sc = device_get_softc(dev); cfgnode = OF_node_from_xref(cfgxref); - ntuples = OF_getencprop_alloc(cfgnode, "pinctrl-single,pins", sizeof(*cfgtuples), - (void **)&cfgtuples); + ntuples = OF_getencprop_alloc_multi(cfgnode, "pinctrl-single,pins", + sizeof(*cfgtuples), (void **)&cfgtuples); if (ntuples < 0) return (ENOENT); |