From mboxrd@z Thu Jan 1 00:00:00 1970 From: Shawn Guo Subject: [PATCH 5/6] dt: add empty of_property_read_u32[_array] for non-dt Date: Fri, 8 Jul 2011 16:27:33 +0800 Message-ID: <1310113654-25887-6-git-send-email-shawn.guo@linaro.org> References: <1310113654-25887-1-git-send-email-shawn.guo@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: patches-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org, Rob Herring , linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org To: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Return-path: In-Reply-To: <1310113654-25887-1-git-send-email-shawn.guo-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: devicetree-discuss-bounces+gldd-devicetree-discuss=m.gmane.org-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org Sender: devicetree-discuss-bounces+gldd-devicetree-discuss=m.gmane.org-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org List-Id: linux-spi.vger.kernel.org The patch adds empty functions of_property_read_u32 and of_property_read_u32_array for non-dt build, so that drivers migrating to dt can save some '#ifdef CONFIG_OF'. Signed-off-by: Shawn Guo Cc: Rob Herring Cc: Thomas Abraham Cc: Grant Likely --- include/linux/of.h | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-) diff --git a/include/linux/of.h b/include/linux/of.h index 4761046..4ef636e 100644 --- a/include/linux/of.h +++ b/include/linux/of.h @@ -255,5 +255,20 @@ static inline bool of_have_populated_dt(void) return false; } +static inline int of_property_read_u32_array(const struct device_node *np, + char *propname, + u32 *out_values, + size_t sz) +{ + return -ENOSYS; +} + +static inline int of_property_read_u32(const struct device_node *np, + char *propname, + u32 *out_value) +{ + return -ENOSYS; +} + #endif /* CONFIG_OF */ #endif /* _LINUX_OF_H */ -- 1.7.4.1