From 5c24d355dd9af29abb25fb3891122af5e80a551d Mon Sep 17 00:00:00 2001 From: Heiko Stuebner Date: Wed, 12 Feb 2014 01:01:42 +0100 Subject: [PATCH] regulator: ti-abb-regulator: do not open-code counting and access of dt array elements Open coding the counting of elements in a dt-property is abstracted by the newly introduced of_property_count_uXX_elems functions. Additionally the raw iteration over the states element exposes the endian conversion and dtb-format details, which according to Mark Rutland "would be nice to limit [...] to of_ helper functions". Thus change ti-abb-regulator to use the helper for element counting and of_property_read_u32_index for retrieval of individual values. This makes it possible to remove the raw access to the property entirely. Signed-off-by: Heiko Stuebner Acked-by: Mark Rutland Signed-off-by: Mark Brown --- Reading git-format-patch failed