From d6de8fe73b88f92d6a222905e1974ec73777d5e5 Mon Sep 17 00:00:00 2001 From: Shilpasri G Bhat Date: Wed, 4 Jul 2018 15:09:23 +0530 Subject: occ: sensors: Fix the size of the phandle array 'sensors' in DT Fixes: 99505c03f493 ("sensor-groups: occ: Add support to disable/enable sensor group") Signed-off-by: Shilpasri G Bhat Signed-off-by: Stewart Smith --- hw/occ.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'hw/occ.c') diff --git a/hw/occ.c b/hw/occ.c index 95577af6..a55bf8ed 100644 --- a/hw/occ.c +++ b/hw/occ.c @@ -1688,11 +1688,11 @@ void occ_add_sensor_groups(struct dt_node *sg, u32 *phandles, u32 *ptype, _phandles[pcount++] = phandles[k]; if (pcount) dt_add_property(node, "sensors", _phandles, - pcount); + pcount * sizeof(u32)); free(_phandles); } else { dt_add_property(node, "sensors", phandles, - nr_phandles); + nr_phandles * sizeof(u32)); } dt_add_property_cells(node, "ops", groups[j].ops); } -- cgit v1.2.1