From patchwork Sat Mar 24 09:27:37 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: thomas.abraham@linaro.org X-Patchwork-Id: 7439 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 77D0023E13 for ; Sat, 24 Mar 2012 09:22:55 +0000 (UTC) Received: from mail-iy0-f180.google.com (mail-iy0-f180.google.com [209.85.210.180]) by fiordland.canonical.com (Postfix) with ESMTP id 30ED9A180FC for ; Sat, 24 Mar 2012 09:22:55 +0000 (UTC) Received: by iage36 with SMTP id e36so7713523iag.11 for ; Sat, 24 Mar 2012 02:22:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:x-auditid :from:to:cc:subject:date:message-id:x-mailer:x-brightmail-tracker :x-tm-as-mml:x-gm-message-state; bh=if6WLf0i3uVPnqRVZ1jQ4a+PoRLCRe+01t+/kgx3VBQ=; b=gn+ho/3rEh+F7zJTblPke9qCP+WhhKZeRL+rHSvCFTXHxC0TIKvFjAxsRpJFZvYSw1 qxRJt+eGQnHiVj4OMNZNccmBo3Cm8DGFo7COviYiZM9Y4VZyK2ZnFCxAzM2Dalx/q+HW DV+kXknZwSsJJaUvS7F3D/2avmF5cEna3y12R1UsGcN7SLHQAI5C72cqNatiNP65BsSh 0T9CbjcZOvCpL1QcokhnUUYy7WwZ7zO6OdGQsqdDc4GTG+qqGee7ScJwzvVabk5xS59e kpgbRIsMM/hMGK2N3zAixT0LoG0GIxwZMUPykstxBM4jJ492IsZCd9etNv82uNCnAj/E 9GFg== Received: by 10.50.155.229 with SMTP id vz5mr1101210igb.12.1332580974615; Sat, 24 Mar 2012 02:22:54 -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.231.203.79 with SMTP id fh15csp43351ibb; Sat, 24 Mar 2012 02:22:53 -0700 (PDT) Received: by 10.68.226.225 with SMTP id rv1mr13941039pbc.149.1332580973193; Sat, 24 Mar 2012 02:22:53 -0700 (PDT) Received: from mailout2.samsung.com (mailout2.samsung.com. [203.254.224.25]) by mx.google.com with ESMTP id o5si11980559pbd.88.2012.03.24.02.22.51; Sat, 24 Mar 2012 02:22:53 -0700 (PDT) Received-SPF: neutral (google.com: 203.254.224.25 is neither permitted nor denied by best guess record for domain of thomas.abraham@linaro.org) client-ip=203.254.224.25; Authentication-Results: mx.google.com; spf=neutral (google.com: 203.254.224.25 is neither permitted nor denied by best guess record for domain of thomas.abraham@linaro.org) smtp.mail=thomas.abraham@linaro.org Received: from epcpsbgm2.samsung.com (mailout2.samsung.com [203.254.224.25]) by mailout2.samsung.com (Oracle Communications Messaging Exchange Server 7u4-19.01 64bit (built Sep 7 2010)) with ESMTP id <0M1D00BIVU225500@mailout2.samsung.com> for patches@linaro.org; Sat, 24 Mar 2012 18:22:50 +0900 (KST) X-AuditID: cbfee61b-b7baeae000004fa7-5e-4f6d926a62a2 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2.samsung.com (MMPCPMTA) with SMTP id 70.58.20391.A629D6F4; Sat, 24 Mar 2012 18:22:50 +0900 (KST) Received: from localhost.localdomain ([107.108.73.37]) by mmp1.samsung.com (Oracle Communications Messaging Exchange Server 7u4-19.01 64bit (built Sep 7 2010)) with ESMTPA id <0M1D00E2XU1XGW40@mmp1.samsung.com> for patches@linaro.org; Sat, 24 Mar 2012 18:22:50 +0900 (KST) From: Thomas Abraham To: devicetree-discuss@lists.ozlabs.org, linux-kernel@vger.kernel.org Cc: rob.herring@calxeda.com, grant.likely@secretlab.ca, patches@linaro.org Subject: [PATCH] of/irq: add empty irq_of_parse_and_map() for non-dt builds Date: Sat, 24 Mar 2012 14:57:37 +0530 Message-id: <1332581257-15989-1-git-send-email-thomas.abraham@linaro.org> X-Mailer: git-send-email 1.6.6.rc2 X-Brightmail-Tracker: AAAAAA== X-TM-AS-MML: No X-Gm-Message-State: ALoCoQmSRsR6Gfl/NaikJhpmkyX+WITw5WyM45pwXm8pjBqDvd9sp3GcTwpdfTg3/IKctQoNgS/0 Add a empty irq_of_parse_and_map() that returns 0 for non-dt builds and avoid having #ifdef CONFIG_OF around all calls to irq_of_parse_and_map(). Suggested-by: Grant Likely Signed-off-by: Thomas Abraham Acked-by: Rob Herring Acked-by: Grant Likely --- include/linux/of_irq.h | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/include/linux/of_irq.h b/include/linux/of_irq.h index d229ad3..5614355 100644 --- a/include/linux/of_irq.h +++ b/include/linux/of_irq.h @@ -76,5 +76,11 @@ extern struct device_node *of_irq_find_parent(struct device_node *child); extern void of_irq_init(const struct of_device_id *matches); #endif /* CONFIG_OF_IRQ */ +#else /* CONFIG_OF */ +static inline unsigned int irq_of_parse_and_map(struct device_node *dev, + int index) +{ + return 0; +} #endif /* CONFIG_OF */ #endif /* __OF_IRQ_H */