From: Rob Herring <robherring2@gmail.com>
To: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org
Cc: Grant Likely <grant.likely@linaro.org>,
davem@davemloft.net, Rob Herring <rob.herring@calxeda.com>
Subject: [PATCH 2/2] dt/irq: add empty of_irq_count for !OF_IRQ
Date: Thu, 7 Nov 2013 12:15:49 -0600 [thread overview]
Message-ID: <1383848149-15488-2-git-send-email-robherring2@gmail.com> (raw)
In-Reply-To: <1383848149-15488-1-git-send-email-robherring2@gmail.com>
From: Rob Herring <rob.herring@calxeda.com>
Add an empty version of of_irq_count for !OF_IRQ. This fixes build error
on sparc in linux-next:
drivers/gpio/gpio-bcm-kona.c:542: undefined reference to `of_irq_count'
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
---
include/linux/of_irq.h | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/include/linux/of_irq.h b/include/linux/of_irq.h
index c0d6dfe..3f23b44 100644
--- a/include/linux/of_irq.h
+++ b/include/linux/of_irq.h
@@ -37,12 +37,20 @@ extern int of_irq_parse_one(struct device_node *device, int index,
extern unsigned int irq_create_of_mapping(struct of_phandle_args *irq_data);
extern int of_irq_to_resource(struct device_node *dev, int index,
struct resource *r);
-extern int of_irq_count(struct device_node *dev);
extern int of_irq_to_resource_table(struct device_node *dev,
struct resource *res, int nr_irqs);
extern void of_irq_init(const struct of_device_id *matches);
+#ifdef CONFIG_OF_IRQ
+extern int of_irq_count(struct device_node *dev);
+#else
+static inline int of_irq_count(struct device_node *dev)
+{
+ return 0;
+}
+#endif
+
#if defined(CONFIG_OF)
/*
* irq_of_parse_and_map() is used by all OF enabled platforms; but SPARC
--
1.8.1.2
next prev parent reply other threads:[~2013-11-07 19:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-07 18:15 [PATCH 1/2] dt: disable self-tests for !OF_IRQ Rob Herring
2013-11-07 18:15 ` Rob Herring [this message]
2013-11-08 14:09 ` Grant Likely
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1383848149-15488-2-git-send-email-robherring2@gmail.com \
--to=robherring2@gmail.com \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=grant.likely@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rob.herring@calxeda.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox