Re: [PATCH v2, resend] device property: Add helpers to count items in an array

2019-06-27 Thread Rafael J. Wysocki
On Thursday, June 13, 2019 6:59:51 PM CEST Andy Shevchenko wrote: > The usual pattern to allocate the necessary space for an array of properties > is > to count them first by calling: > > count = device_property_read_uXX_array(dev, propname, NULL, 0); > if (count < 0) > return count; >

[PATCH v2, resend] device property: Add helpers to count items in an array

2019-06-13 Thread Andy Shevchenko
The usual pattern to allocate the necessary space for an array of properties is to count them first by calling: count = device_property_read_uXX_array(dev, propname, NULL, 0); if (count < 0) return count; Introduce helpers device_property_count_uXX() to count items by supplying hard c