]> git.baikalelectronics.ru Git - kernel.git/commit
device: property: add helpers to count items in string arrays
authorBartosz Golaszewski <bgolaszewski@baylibre.com>
Wed, 9 Sep 2020 08:54:24 +0000 (10:54 +0200)
committerBartosz Golaszewski <bgolaszewski@baylibre.com>
Mon, 14 Sep 2020 08:53:43 +0000 (10:53 +0200)
commit168741d5d04caa4e09512d8001da9e9844bad24f
treeff0f2ee99dfe3988897fa86be2dc6501d0baecaa
parent4ccab6dab2797e8ebc5e8e5ce226b7e8a62cb038
device: property: add helpers to count items in string arrays

Instead of doing the following:

    count = device_property_read_string_array(dev, propname, NULL, 0);

Let's provide inline helpers with hardcoded arguments for counting
strings in property arrays.

Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
include/linux/property.h