devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Grant Likely <grant.likely@linaro.org>,
	Rob Herring <robh+dt@kernel.org>, Arnd Bergmann <arnd@arndb.de>
Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	Geert Uytterhoeven <geert@linux-m68k.org>
Subject: [PATCH 3/3] of: Add dummy of_irq_to_resource_table() for IRQ_OF=n
Date: Sun,  5 Apr 2015 16:59:25 +0200	[thread overview]
Message-ID: <1428245965-19618-4-git-send-email-geert@linux-m68k.org> (raw)
In-Reply-To: <1428245965-19618-1-git-send-email-geert@linux-m68k.org>

If CONFIG_IRQ_OF=n:

drivers/built-in.o: In function `of_device_alloc':
(.text+0x72bce): undefined reference to `of_irq_to_resource_table'
make: *** [vmlinux] Error 1

of_device_alloc() calls of_irq_to_resource_table() with nr_irqs = 0 due
to of_irq_count() already being a dummy, so just add a dummy for
of_irq_to_resource_table(), too.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
 include/linux/of_irq.h | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/include/linux/of_irq.h b/include/linux/of_irq.h
index bfec136a6d1e60f8..d884929a77479782 100644
--- a/include/linux/of_irq.h
+++ b/include/linux/of_irq.h
@@ -37,8 +37,6 @@ 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_to_resource_table(struct device_node *dev,
-		struct resource *res, int nr_irqs);
 
 extern void of_irq_init(const struct of_device_id *matches);
 
@@ -46,6 +44,8 @@ extern void of_irq_init(const struct of_device_id *matches);
 extern int of_irq_count(struct device_node *dev);
 extern int of_irq_get(struct device_node *dev, int index);
 extern int of_irq_get_byname(struct device_node *dev, const char *name);
+extern int of_irq_to_resource_table(struct device_node *dev,
+		struct resource *res, int nr_irqs);
 #else
 static inline int of_irq_count(struct device_node *dev)
 {
@@ -59,6 +59,11 @@ static inline int of_irq_get_byname(struct device_node *dev, const char *name)
 {
 	return 0;
 }
+static inline int of_irq_to_resource_table(struct device_node *dev,
+					   struct resource *res, int nr_irqs)
+{
+	return 0;
+}
 #endif
 
 #if defined(CONFIG_OF)
-- 
1.9.1

  parent reply	other threads:[~2015-04-05 14:59 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-05 14:59 [PATCH 0/3] of: Increase compile coverage Geert Uytterhoeven
     [not found] ` <1428245965-19618-1-git-send-email-geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>
2015-04-05 14:59   ` [PATCH 1/3] of: Allow OF to be enabled if COMPILE_TEST to increase coverage Geert Uytterhoeven
     [not found]     ` <1428245965-19618-2-git-send-email-geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>
2015-04-06 13:13       ` Rob Herring
     [not found]         ` <CAL_JsqLQrNEpqWnqP4uDV0x87wERLC50FO-06fYBwLbyYsChpQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-04-23 12:03           ` Pantelis Antoniou
     [not found]             ` <0C5158C3-2BD3-4EC6-B1AC-B669F30B4C34-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>
2015-04-23 18:22               ` Rob Herring
2015-04-23 18:28                 ` Pantelis Antoniou
2015-04-05 14:59 ` [PATCH 2/3] of: OF_IRQ should depend on IRQ_DOMAIN Geert Uytterhoeven
2015-04-06 14:40   ` Arnd Bergmann
2015-04-06 15:26     ` Rob Herring
2015-04-06 15:26     ` Geert Uytterhoeven
2015-04-06 21:39       ` Arnd Bergmann
     [not found]   ` <1428245965-19618-3-git-send-email-geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>
2015-04-15 12:54     ` Rob Herring
2015-04-05 14:59 ` Geert Uytterhoeven [this message]
     [not found]   ` <1428245965-19618-4-git-send-email-geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>
2015-04-15 12:54     ` [PATCH 3/3] of: Add dummy of_irq_to_resource_table() for IRQ_OF=n Rob Herring

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=1428245965-19618-4-git-send-email-geert@linux-m68k.org \
    --to=geert@linux-m68k.org \
    --cc=arnd@arndb.de \
    --cc=devicetree@vger.kernel.org \
    --cc=grant.likely@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).