From: Stephen Neuendorffer <stephen.neuendorffer-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org>
To: grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
Subject: [PATCH 4/9] drivers/of: Allow IRQ code to work properly on architectures without NO_IRQ
Date: Fri, 23 Jul 2010 13:57:38 -0700 [thread overview]
Message-ID: <e07ceaf0-18ef-4a0c-bc5e-6d7ff69fb07b@SG2EHSMHS007.ehs.local> (raw)
In-Reply-To: <1279918663-29960-4-git-send-email-stephen.neuendorffer-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org>
Sane architectures don't rely on NO_IRQ. The device tree code shouldn't
require it either.
---
drivers/of/irq.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/of/irq.c b/drivers/of/irq.c
index 6cfb307..e85883e 100644
--- a/drivers/of/irq.c
+++ b/drivers/of/irq.c
@@ -24,6 +24,12 @@
#include <linux/of_irq.h>
#include <linux/string.h>
+#ifdef NO_IRQ
+#define OF_NO_IRQ NO_IRQ
+#else
+#define OF_NO_IRQ 0
+#endif
+
/**
* irq_of_parse_and_map - Parse and map an interrupt into linux virq space
* @device: Device node of the device whose interrupt is to be mapped
@@ -37,7 +43,7 @@ unsigned int irq_of_parse_and_map(struct device_node *dev, int index)
struct of_irq oirq;
if (of_irq_map_one(dev, index, &oirq))
- return NO_IRQ;
+ return OF_NO_IRQ;
return irq_create_of_mapping(oirq.controller, oirq.specifier,
oirq.size);
@@ -337,7 +343,7 @@ int of_irq_to_resource(struct device_node *dev, int index, struct resource *r)
/* Only dereference the resource if both the
* resource and the irq are valid. */
- if (r && irq != NO_IRQ) {
+ if (r && irq != OF_NO_IRQ) {
r->start = r->end = irq;
r->flags = IORESOURCE_IRQ;
r->name = dev->full_name;
--
1.5.6.6
This email and any attachments are intended for the sole use of the named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you are not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.
next prev parent reply other threads:[~2010-07-23 20:57 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1279918663-29960-1-git-send-email-stephen.neuendorffer@xilinx.com>
[not found] ` <1279918663-29960-1-git-send-email-stephen.neuendorffer-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org>
2010-07-23 20:57 ` [PATCH 1/9] drivers/of: Make device tree code work on any arch Stephen Neuendorffer
[not found] ` <7e773827-71eb-47a5-826c-cd255b4ce02c-RaUQJvECHiusiP+nND6G/7jjLBE8jN/0@public.gmane.org>
2010-08-10 17:22 ` Grant Likely
2010-07-23 21:39 ` [PATCH 0/9] Xilinx PCI endpoint driver Stephen Neuendorffer
[not found] ` <0f773b9c-7bf4-4795-93e1-64b1f81dd286-+Ck8Kgl/v08NTaRkHJHP0bjjLBE8jN/0@public.gmane.org>
2010-08-10 17:15 ` Grant Likely
[not found] ` <AANLkTim81JjUYzRaiz_X3sh1evKSEfUia39_Lzjr7H-o-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-08-10 17:27 ` Stephen Neuendorffer
[not found] ` <1279918663-29960-2-git-send-email-stephen.neuendorffer@xilinx.com>
[not found] ` <1279918663-29960-2-git-send-email-stephen.neuendorffer-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org>
2010-07-23 20:57 ` [PATCH 2/9] of/fdt: Add unflatten_partial_device_tree Stephen Neuendorffer
[not found] ` <39f3d9ca-1943-43b8-a1f6-eba8fb2aeeec-RaUQJvECHiuXHCJdrdq+zrjjLBE8jN/0@public.gmane.org>
2010-08-10 17:46 ` Grant Likely
[not found] ` <AANLkTimPsDWcW_3z46mMFCxkui+3v6q64F2EMLBr6mNK-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-08-10 17:54 ` Stephen Neuendorffer
[not found] ` <1279918663-29960-3-git-send-email-stephen.neuendorffer@xilinx.com>
[not found] ` <1279918663-29960-3-git-send-email-stephen.neuendorffer-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org>
2010-07-23 20:57 ` [PATCH 3/9] of/base.c: export property access/modification functions Stephen Neuendorffer
[not found] ` <ceba5315-090d-4776-9315-0cbca209b5af-RaUQJvECHiv5op9OF0Koj7jjLBE8jN/0@public.gmane.org>
2010-08-10 18:14 ` Grant Likely
[not found] ` <1279918663-29960-4-git-send-email-stephen.neuendorffer@xilinx.com>
[not found] ` <1279918663-29960-4-git-send-email-stephen.neuendorffer-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org>
2010-07-23 20:57 ` Stephen Neuendorffer [this message]
[not found] ` <1279918663-29960-5-git-send-email-stephen.neuendorffer@xilinx.com>
[not found] ` <1279918663-29960-5-git-send-email-stephen.neuendorffer-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org>
2010-07-23 20:57 ` [PATCH 5/9] arch/x86: Add support for device tree code Stephen Neuendorffer
[not found] ` <a85fdc9c-4a93-4381-b01e-5b9bc7666863-RaUQJvECHitCYczPSvLbDrjjLBE8jN/0@public.gmane.org>
2010-08-10 18:00 ` Grant Likely
[not found] ` <1279918663-29960-6-git-send-email-stephen.neuendorffer@xilinx.com>
[not found] ` <1279918663-29960-6-git-send-email-stephen.neuendorffer-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org>
2010-07-23 20:57 ` [PATCH 6/9] [Xilinx] xilinx_pcipr: Added Xilinx reconfigurable PCI endpoint driver Stephen Neuendorffer
[not found] ` <fad5faaa-1fab-4d9f-b41e-236b874e9c08-RaUQJvECHiv5op9OF0Koj7jjLBE8jN/0@public.gmane.org>
2010-08-10 18:14 ` Grant Likely
[not found] ` <1279918663-29960-7-git-send-email-stephen.neuendorffer@xilinx.com>
[not found] ` <1279918663-29960-7-git-send-email-stephen.neuendorffer-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org>
2010-07-23 20:57 ` [PATCH 7/9] [Xilinx] xilinx_hwicap: use linux/io.h instead of asm/io.h Stephen Neuendorffer
[not found] ` <bd5961af-2af1-4f6d-a220-a03fdbb19453-+Ck8Kgl/v0+44QFJ4H5SYbjjLBE8jN/0@public.gmane.org>
2010-08-10 18:16 ` Grant Likely
[not found] ` <1279918663-29960-8-git-send-email-stephen.neuendorffer@xilinx.com>
[not found] ` <1279918663-29960-8-git-send-email-stephen.neuendorffer-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org>
2010-07-23 20:57 ` [PATCH 8/9] [Xilinx] xilinx_hwicap: Update driver to use generic io accessors Stephen Neuendorffer
[not found] ` <e8b3593c-3be3-4b4e-aabd-e3baeb4e792a-+Ck8Kgl/v0/VOT3FKhN2rLjjLBE8jN/0@public.gmane.org>
2010-08-10 18:17 ` Grant Likely
[not found] ` <1279918663-29960-9-git-send-email-stephen.neuendorffer@xilinx.com>
[not found] ` <1279918663-29960-9-git-send-email-stephen.neuendorffer-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org>
2010-07-23 20:57 ` [PATCH 9/9] [Xilinx] xilinx_hwicap: Enable whenever OF/device trees are available Stephen Neuendorffer
[not found] ` <d3cc257d-ca6f-40cd-82d4-5941e5fbc1d0-RaUQJvECHitZbvUCbuG1mrjjLBE8jN/0@public.gmane.org>
2010-08-10 18:18 ` Grant Likely
[not found] ` <AANLkTimxkhWtnwViKj=3rEXcwZ7rPNezTe39Ef3Q5-WO-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-08-10 19:01 ` Stephen Neuendorffer
[not found] ` <5817abce-3f51-4e8e-a8ba-f95ea13a3536-RaUQJvECHiv5op9OF0Koj7jjLBE8jN/0@public.gmane.org>
2010-08-10 19:19 ` 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=e07ceaf0-18ef-4a0c-bc5e-6d7ff69fb07b@SG2EHSMHS007.ehs.local \
--to=stephen.neuendorffer-gjffaj9ahvfqt0dzr+alfa@public.gmane.org \
--cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
--cc=grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.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