aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStanislaw Gruszka <stf_xl@wp.pl>2009-03-05 10:10:57 -0500
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-03-05 10:10:57 -0500
commit849d7130001ab740a5a4778a561049841fdd77c9 (patch)
treec7031ed3d3aa24270d0f001d3616698aeb3fe39a
parenta509538d4fb4f99cdf0a095213d57cc3b2347615 (diff)
ide: allow to wrap interrupt handler
Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl> Cc: Andrew Victor <linux@maxim.org.za> [bart: minor checkpatch.pl / CodingStyle fixups] Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
-rw-r--r--drivers/ide/ide-io.c1
-rw-r--r--drivers/ide/ide-probe.c7
-rw-r--r--include/linux/ide.h1
3 files changed, 8 insertions, 1 deletions
diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c
index 9ff90cb1dbf1..a9a6c208288a 100644
--- a/drivers/ide/ide-io.c
+++ b/drivers/ide/ide-io.c
@@ -1162,6 +1162,7 @@ out_early:
1162 1162
1163 return irq_ret; 1163 return irq_ret;
1164} 1164}
1165EXPORT_SYMBOL_GPL(ide_intr);
1165 1166
1166/** 1167/**
1167 * ide_do_drive_cmd - issue IDE special command 1168 * ide_do_drive_cmd - issue IDE special command
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c
index ce0818a993f6..ee8e3e7cad51 100644
--- a/drivers/ide/ide-probe.c
+++ b/drivers/ide/ide-probe.c
@@ -950,6 +950,7 @@ static int ide_port_setup_devices(ide_hwif_t *hwif)
950static int init_irq (ide_hwif_t *hwif) 950static int init_irq (ide_hwif_t *hwif)
951{ 951{
952 struct ide_io_ports *io_ports = &hwif->io_ports; 952 struct ide_io_ports *io_ports = &hwif->io_ports;
953 irq_handler_t irq_handler;
953 int sa = 0; 954 int sa = 0;
954 955
955 mutex_lock(&ide_cfg_mtx); 956 mutex_lock(&ide_cfg_mtx);
@@ -959,6 +960,10 @@ static int init_irq (ide_hwif_t *hwif)
959 hwif->timer.function = &ide_timer_expiry; 960 hwif->timer.function = &ide_timer_expiry;
960 hwif->timer.data = (unsigned long)hwif; 961 hwif->timer.data = (unsigned long)hwif;
961 962
963 irq_handler = hwif->host->irq_handler;
964 if (irq_handler == NULL)
965 irq_handler = ide_intr;
966
962#if defined(__mc68000__) 967#if defined(__mc68000__)
963 sa = IRQF_SHARED; 968 sa = IRQF_SHARED;
964#endif /* __mc68000__ */ 969#endif /* __mc68000__ */
@@ -969,7 +974,7 @@ static int init_irq (ide_hwif_t *hwif)
969 if (io_ports->ctl_addr) 974 if (io_ports->ctl_addr)
970 hwif->tp_ops->set_irq(hwif, 1); 975 hwif->tp_ops->set_irq(hwif, 1);
971 976
972 if (request_irq(hwif->irq, &ide_intr, sa, hwif->name, hwif)) 977 if (request_irq(hwif->irq, irq_handler, sa, hwif->name, hwif))
973 goto out_up; 978 goto out_up;
974 979
975 if (!hwif->rqsize) { 980 if (!hwif->rqsize) {
diff --git a/include/linux/ide.h b/include/linux/ide.h
index fe235b65207e..e0cedfe9fad4 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -866,6 +866,7 @@ struct ide_host {
866 unsigned int n_ports; 866 unsigned int n_ports;
867 struct device *dev[2]; 867 struct device *dev[2];
868 unsigned int (*init_chipset)(struct pci_dev *); 868 unsigned int (*init_chipset)(struct pci_dev *);
869 irq_handler_t irq_handler;
869 unsigned long host_flags; 870 unsigned long host_flags;
870 void *host_priv; 871 void *host_priv;
871 ide_hwif_t *cur_port; /* for hosts requiring serialization */ 872 ide_hwif_t *cur_port; /* for hosts requiring serialization */