Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
device property: Add helpers to count items in an array
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 coded last two parameters to device_property_readXX_array(). Signed-off-by: Andy Shevchenko <[email protected]> Acked-by: Sakari Ailus <[email protected]> Reviewed-by: Heikki Krogerus <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
- Loading branch information