From: Stanislaw Gruszka <stf_xl@wp.pl>
To: linux-ide@vger.kernel.org, Andrew Victor <linux@maxim.org.za>
Cc: linux-arm-kernel@lists.arm.linux.org.uk
Subject: [PATCH 1/3] ide: allow to wrap interrupt handler
Date: Tue, 3 Feb 2009 11:46:59 +0100 [thread overview]
Message-ID: <200902031146.59602.stf_xl@wp.pl> (raw)
Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
---
drivers/ide/ide-io.c | 2 ++
drivers/ide/ide-probe.c | 6 +++++-
include/linux/ide.h | 1 +
3 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c
index 9ee51ad..086bea2 100644
--- a/drivers/ide/ide-io.c
+++ b/drivers/ide/ide-io.c
@@ -1163,6 +1163,8 @@ out_early:
return irq_ret;
}
+EXPORT_SYMBOL_GPL(ide_intr);
+
/**
* ide_do_drive_cmd - issue IDE special command
* @drive: device to issue command
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c
index ce0818a..821563d 100644
--- a/drivers/ide/ide-probe.c
+++ b/drivers/ide/ide-probe.c
@@ -951,6 +951,7 @@ static int init_irq (ide_hwif_t *hwif)
{
struct ide_io_ports *io_ports = &hwif->io_ports;
int sa = 0;
+ irq_handler_t irq_handler;
mutex_lock(&ide_cfg_mtx);
spin_lock_init(&hwif->lock);
@@ -969,7 +970,10 @@ static int init_irq (ide_hwif_t *hwif)
if (io_ports->ctl_addr)
hwif->tp_ops->set_irq(hwif, 1);
- if (request_irq(hwif->irq, &ide_intr, sa, hwif->name, hwif))
+ irq_handler = hwif->host->irq_handler;
+ if (!irq_handler)
+ irq_handler = &ide_intr;
+ if (request_irq(hwif->irq, irq_handler, sa, hwif->name, hwif))
goto out_up;
if (!hwif->rqsize) {
diff --git a/include/linux/ide.h b/include/linux/ide.h
index 194da5a..bfae29f 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -866,6 +866,7 @@ struct ide_host {
unsigned int n_ports;
struct device *dev[2];
unsigned int (*init_chipset)(struct pci_dev *);
+ irq_handler_t irq_handler;
unsigned long host_flags;
void *host_priv;
ide_hwif_t *cur_port; /* for hosts requiring serialization */
--
1.5.2.5
next reply other threads:[~2009-02-03 10:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-03 10:46 Stanislaw Gruszka [this message]
2009-03-05 13:48 ` [PATCH 1/3] ide: allow to wrap interrupt handler Bartlomiej Zolnierkiewicz
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=200902031146.59602.stf_xl@wp.pl \
--to=stf_xl@wp.pl \
--cc=linux-arm-kernel@lists.arm.linux.org.uk \
--cc=linux-ide@vger.kernel.org \
--cc=linux@maxim.org.za \
/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).