From: Colin Cross <ccross@android.com>
To: linux-kernel@vger.kernel.org
Cc: Colin Cross <ccross@android.com>, Thomas Gleixner <tglx@linutronix.de>
Subject: [PATCH] irq: generic-chip: pass an irq in chip to suspend/resume
Date: Fri, 16 Mar 2012 16:10:02 -0700 [thread overview]
Message-ID: <1331939402-12110-1-git-send-email-ccross@android.com> (raw)
irq_gc_suspend and irq_gc_resume pass the irq_data of irq_base
to the ops, but if irq_mask bit 0 is not set, that irq_data is
not part of the generic chip, and there is no way to get to the
generic chip data from there. Instead, pass the irq_data of
gc->irq_base + gc->irq_cnt - 1, which is guaranteed to be part
of this generic chip.
Change-Id: Idec42ea5714aae8dad16f9994a9f96ba9b61bfb6
Signed-off-by: Colin Cross <ccross@android.com>
---
kernel/irq/generic-chip.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/kernel/irq/generic-chip.c b/kernel/irq/generic-chip.c
index c89295a..40b952f 100644
--- a/kernel/irq/generic-chip.c
+++ b/kernel/irq/generic-chip.c
@@ -324,9 +324,10 @@ static int irq_gc_suspend(void)
list_for_each_entry(gc, &gc_list, list) {
struct irq_chip_type *ct = gc->chip_types;
+ int irq = gc->irq_base + gc->irq_cnt - 1;
if (ct->chip.irq_suspend)
- ct->chip.irq_suspend(irq_get_irq_data(gc->irq_base));
+ ct->chip.irq_suspend(irq_get_irq_data(irq));
}
return 0;
}
@@ -337,9 +338,10 @@ static void irq_gc_resume(void)
list_for_each_entry(gc, &gc_list, list) {
struct irq_chip_type *ct = gc->chip_types;
+ int irq = gc->irq_base + gc->irq_cnt - 1;
if (ct->chip.irq_resume)
- ct->chip.irq_resume(irq_get_irq_data(gc->irq_base));
+ ct->chip.irq_resume(irq_get_irq_data(irq));
}
}
#else
--
1.7.7.3
reply other threads:[~2012-03-16 23:10 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=1331939402-12110-1-git-send-email-ccross@android.com \
--to=ccross@android.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
/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