From patchwork Mon Oct 10 16:19:35 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rajendra Nayak X-Patchwork-Id: 4590 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 2814923DEF for ; Mon, 10 Oct 2011 16:21:04 +0000 (UTC) Received: from mail-yw0-f52.google.com (mail-yw0-f52.google.com [209.85.213.52]) by fiordland.canonical.com (Postfix) with ESMTP id EBF3CA181F6 for ; Mon, 10 Oct 2011 16:21:03 +0000 (UTC) Received: by ywp31 with SMTP id 31so8515215ywp.11 for ; Mon, 10 Oct 2011 09:21:03 -0700 (PDT) Received: by 10.223.60.73 with SMTP id o9mr15607000fah.18.1318263663194; Mon, 10 Oct 2011 09:21:03 -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.152.24.41 with SMTP id r9cs121852laf; Mon, 10 Oct 2011 09:21:02 -0700 (PDT) Received: by 10.146.53.36 with SMTP id b36mr3764154yaa.9.1318263660752; Mon, 10 Oct 2011 09:21:00 -0700 (PDT) Received: from bear.ext.ti.com (bear.ext.ti.com. [192.94.94.41]) by mx.google.com with ESMTPS id n1si7655756anh.94.2011.10.10.09.21.00 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 10 Oct 2011 09:21:00 -0700 (PDT) Received-SPF: pass (google.com: domain of rnayak@ti.com designates 192.94.94.41 as permitted sender) client-ip=192.94.94.41; Authentication-Results: mx.google.com; spf=pass (google.com: domain of rnayak@ti.com designates 192.94.94.41 as permitted sender) smtp.mail=rnayak@ti.com Received: from dbdp20.itg.ti.com ([172.24.170.38]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id p9AGKuL3017085 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 10 Oct 2011 11:20:58 -0500 Received: from dbde70.ent.ti.com (localhost [127.0.0.1]) by dbdp20.itg.ti.com (8.13.8/8.13.8) with ESMTP id p9AGKrYI009440; Mon, 10 Oct 2011 21:50:56 +0530 (IST) Received: from dbdp31.itg.ti.com (172.24.170.98) by DBDE70.ent.ti.com (172.24.170.148) with Microsoft SMTP Server id 8.3.106.1; Mon, 10 Oct 2011 21:50:54 +0530 Received: from ula0131687.itg.ti.com (h82-67.vpn.ti.com [172.24.82.67]) by dbdp31.itg.ti.com (8.13.8/8.13.8) with ESMTP id p9AGKito010869; Mon, 10 Oct 2011 21:50:54 +0530 (IST) From: Rajendra Nayak To: , CC: , , , , , , , , Rajendra Nayak Subject: [PATCH v2 2/5] dt: add empty dt helpers for non-dt build Date: Mon, 10 Oct 2011 21:49:35 +0530 Message-ID: <1318263578-7407-3-git-send-email-rnayak@ti.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1318263578-7407-1-git-send-email-rnayak@ti.com> References: <1318263578-7407-1-git-send-email-rnayak@ti.com> MIME-Version: 1.0 Add empty of_device_is_compatible(), of_find_property() and of_parse_phandle() for non-dt builds to work. Signed-off-by: Rajendra Nayak --- include/linux/of.h | 19 +++++++++++++++++++ 1 files changed, 19 insertions(+), 0 deletions(-) diff --git a/include/linux/of.h b/include/linux/of.h index 9180dc5..47ce461 100644 --- a/include/linux/of.h +++ b/include/linux/of.h @@ -263,6 +263,25 @@ static inline const void *of_get_property(const struct device_node *node, return NULL; } +static inline int of_device_is_compatible(const struct device_node *device, + const char *name) +{ + return 0; +} + +static inline struct property *of_find_property(const struct device_node *np, + const char *name, + int *lenp) +{ + return NULL; +} + +static inline struct device_node *of_parse_phandle(struct device_node *np, + const char *phandle_name, + int index) +{ + return NULL; +} #endif /* CONFIG_OF */ static inline int of_property_read_u32(const struct device_node *np,