linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Milton Miller <miltonm@bga.com>
To: Christian Borntraeger <borntraeger@de.ibm.com>,
	Benjiman Herrenschmidt <benh@kernel.crashing.org>
Cc: linuxppc-dev list <linuxppc-dev@ozlabs.org>,
	lkml <linux-kernel@vger.kernel.org>,
	Alan Cox <alan@lxorguk.ukuu.org.uk>,
	Joe Peterson <joe@skyrush.com>
Subject: [PATCH 3/4] hvc_console: free_irq only if request_irq was successful
Date: Thu, 08 Jan 2009 06:14:21 -0600	[thread overview]
Message-ID: <hvc-console-29-3-3@bga.com> (raw)
In-Reply-To: : <hvc-console-29-3@bga.com>

Only call free_irq if we marked the request_irq has having succeeded
instead of whenever the the sub-driver identified the interrupt to use.

Signed-off-by: Milton Miller <miltonm@bga.com>
---
Appears to be a bugfix but might use a bit of time in -next.
This code was created in 2.6.28 to allow s390 to build without adding ifdefs.
Many hvc-console sub-drivers have a single channel and are not modules.

Index: work.git/drivers/char/hvc_irq.c
===================================================================
--- work.git.orig/drivers/char/hvc_irq.c	2009-01-08 04:07:28.000000000 -0600
+++ work.git/drivers/char/hvc_irq.c	2009-01-08 04:07:47.000000000 -0600
@@ -37,7 +37,7 @@ int notifier_add_irq(struct hvc_struct *
 
 void notifier_del_irq(struct hvc_struct *hp, int irq)
 {
-	if (!irq)
+	if (!hp->irq_requested)
 		return;
 	free_irq(irq, hp);
 	hp->irq_requested = 0;

  parent reply	other threads:[~2009-01-08 12:14 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-08  5:18 [BUG] hvc_console WARN() on current upstream Benjamin Herrenschmidt
2009-01-08  7:57 ` Christian Borntraeger
2009-01-08  8:42   ` Benjamin Herrenschmidt
2009-01-08 11:11     ` Alan Cox
2009-01-08 12:12       ` [PATCH 0/5] hvc_console updates was " Milton Miller
2009-01-08 12:14         ` [PATCH 4/4] hvc_console: comment mb and make it an smp_ one Milton Miller
2009-01-08 12:14         ` Milton Miller [this message]
2009-01-08 16:50           ` [PATCH 3/4] hvc_console: free_irq only if request_irq was successful Christian Borntraeger
2009-01-08 12:14         ` [PATCH 1/4] hvc_console: do not set low_latency Milton Miller
2009-01-08 12:36           ` Alan Cox
2009-01-08 13:25             ` Milton Miller
2009-01-13  9:04           ` Christian Borntraeger
2009-01-13 11:28             ` Christian Borntraeger
2009-01-13 11:35             ` Hendrik Brueckner
2009-01-13 16:03               ` Milton Miller
2009-01-13 21:04                 ` Benjamin Herrenschmidt
2009-01-15  9:15                   ` [PATCH 1/4 v2] hvc_console: remove tty->low_latency Hendrik Brueckner
2009-01-15  9:17                     ` Christian Borntraeger
2009-01-08 12:14         ` [PATCH 2/4] hvc_console: use kzalloc Milton Miller
2009-01-08 20:36       ` [BUG] hvc_console WARN() on current upstream Benjamin Herrenschmidt

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=hvc-console-29-3-3@bga.com \
    --to=miltonm@bga.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=benh@kernel.crashing.org \
    --cc=borntraeger@de.ibm.com \
    --cc=joe@skyrush.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.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).