From patchwork Fri Jul 8 08:27:33 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shawn Guo X-Patchwork-Id: 2589 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id EA80423F58 for ; Fri, 8 Jul 2011 08:17:36 +0000 (UTC) Received: from mail-qw0-f52.google.com (mail-qw0-f52.google.com [209.85.216.52]) by fiordland.canonical.com (Postfix) with ESMTP id B56CAA184AE for ; Fri, 8 Jul 2011 08:17:36 +0000 (UTC) Received: by mail-qw0-f52.google.com with SMTP id 8so1183928qwb.11 for ; Fri, 08 Jul 2011 01:17:36 -0700 (PDT) Received: by 10.229.102.98 with SMTP id f34mr1372147qco.42.1310113056444; Fri, 08 Jul 2011 01:17:36 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.229.48.135 with SMTP id r7cs130512qcf; Fri, 8 Jul 2011 01:17:36 -0700 (PDT) Received: by 10.91.197.19 with SMTP id z19mr1743571agp.49.1310113056034; Fri, 08 Jul 2011 01:17:36 -0700 (PDT) Received: from mail-iy0-f178.google.com (mail-iy0-f178.google.com [209.85.210.178]) by mx.google.com with ESMTPS id y7si3592897icj.115.2011.07.08.01.17.34 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 08 Jul 2011 01:17:34 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.210.178 is neither permitted nor denied by best guess record for domain of shawn.guo@linaro.org) client-ip=209.85.210.178; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.210.178 is neither permitted nor denied by best guess record for domain of shawn.guo@linaro.org) smtp.mail=shawn.guo@linaro.org Received: by iyb26 with SMTP id 26so1915926iyb.37 for ; Fri, 08 Jul 2011 01:17:34 -0700 (PDT) Received: by 10.42.178.137 with SMTP id bm9mr1520211icb.313.1310113054307; Fri, 08 Jul 2011 01:17:34 -0700 (PDT) Received: from localhost.localdomain ([114.218.200.65]) by mx.google.com with ESMTPS id s2sm10692207icw.17.2011.07.08.01.17.24 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 08 Jul 2011 01:17:33 -0700 (PDT) From: Shawn Guo To: spi-devel-general@lists.sourceforge.net Cc: devicetree-discuss@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org, patches@linaro.org, Shawn Guo , Rob Herring , Thomas Abraham , Grant Likely 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> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1310113654-25887-1-git-send-email-shawn.guo@linaro.org> References: <1310113654-25887-1-git-send-email-shawn.guo@linaro.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 */