linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Magnus Damm <magnus.damm@gmail.com>
To: linux-sh@vger.kernel.org
Subject: [PATCH] sh: fix INTC to use set_irq_chained_handler() for redirects
Date: Tue, 09 Feb 2010 07:17:20 +0000	[thread overview]
Message-ID: <20100209071720.3947.94798.sendpatchset@rxone.opensource.se> (raw)

From: Magnus Damm <damm@opensource.se>

This patch updates the shared INTC code to use
set_irq_chained_handler() for intc_redirect_irq().

With this in place request_irq() on a merged irq
which has been redirected will now return -EINVAL
instead of 0 together with a crash. This thanks to
the protection of the IRQ_NOREQUEST flag set for
chained interrupt handlers.

Signed-off-by: Magnus Damm <damm@opensource.se>
---

 drivers/sh/intc.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- 0003/drivers/sh/intc.c
+++ work/drivers/sh/intc.c	2010-02-09 16:06:13.000000000 +0900
@@ -896,8 +896,8 @@ void __init register_intc_controller(str
 			vect2->enum_id = 0;
 
 			/* redirect this interrupts to the first one */
-			set_irq_chip_and_handler_name(irq2, &d->chip,
-					intc_redirect_irq, "redirect");
+			set_irq_chained_handler(irq2, intc_redirect_irq);
+			set_irq_chip(irq2, &d->chip);
 			set_irq_data(irq2, (void *)irq);
 		}
 	}

                 reply	other threads:[~2010-02-09  7:17 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20100209071720.3947.94798.sendpatchset@rxone.opensource.se \
    --to=magnus.damm@gmail.com \
    --cc=linux-sh@vger.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).