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: 956302 Received: from lists.sourceforge.net (lists.sourceforge.net [216.34.181.88]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p688MtrK003486 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 8 Jul 2011 08:23:16 GMT Received: from localhost ([127.0.0.1] helo=sfs-ml-3.v29.ch3.sourceforge.com) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1Qf6Ks-0005dB-FB; Fri, 08 Jul 2011 08:22:54 +0000 Received: from sog-mx-3.v43.ch3.sourceforge.com ([172.29.43.193] helo=mx.sourceforge.net) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1Qf6Kr-0005d3-Gf for spi-devel-general@lists.sourceforge.net; Fri, 08 Jul 2011 08:22:53 +0000 X-ACL-Warn: Received: from mail-iw0-f175.google.com ([209.85.214.175]) by sog-mx-3.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128) (Exim 4.76) id 1Qf6Kq-0006LZ-QT for spi-devel-general@lists.sourceforge.net; Fri, 08 Jul 2011 08:22:53 +0000 Received: by iwn4 with SMTP id 4so2195319iwn.34 for ; Fri, 08 Jul 2011 01:22:47 -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 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> X-Spam-Score: -0.0 (/) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -0.0 AWL AWL: From: address is in the auto white-list X-Headers-End: 1Qf6Kq-0006LZ-QT Cc: patches@linaro.org, devicetree-discuss@lists.ozlabs.org, Rob Herring , Thomas Abraham , Shawn Guo , linux-arm-kernel@lists.infradead.org X-BeenThere: spi-devel-general@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: Linux SPI core/device drivers discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: spi-devel-general-bounces@lists.sourceforge.net X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Fri, 08 Jul 2011 08:23:16 +0000 (UTC) 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 */