summaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorAndy Shevchenko2019-06-13 18:59:51 +0200
committerRafael J. Wysocki2019-06-13 22:41:59 +0200
commit33ee09cd59ce154b64f9df942dfa5456db90d5f9 (patch)
tree2b513f0f32f18ef93ab2f1e9222316ff6604fca2 /block
parentplatform/x86: intel_cht_int33fe: Replacing the old connections with references (diff)
downloadkernel-qcow2-linux-33ee09cd59ce154b64f9df942dfa5456db90d5f9.tar.gz
kernel-qcow2-linux-33ee09cd59ce154b64f9df942dfa5456db90d5f9.tar.xz
kernel-qcow2-linux-33ee09cd59ce154b64f9df942dfa5456db90d5f9.zip
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 <andriy.shevchenko@linux.intel.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'block')
0 files changed, 0 insertions, 0 deletions