]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
ide: allow to wrap interrupt handler
authorStanislaw Gruszka <stf_xl@wp.pl>
Thu, 5 Mar 2009 15:10:57 +0000 (16:10 +0100)
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Thu, 5 Mar 2009 15:10:57 +0000 (16:10 +0100)
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>
drivers/ide/ide-io.c
drivers/ide/ide-probe.c
include/linux/ide.h

index 9ff90cb1dbf15c4423fbc0e71bf20339283758a4..a9a6c208288a27173970b705de620fea3e076294 100644 (file)
@@ -1162,6 +1162,7 @@ out_early:
 
        return irq_ret;
 }
+EXPORT_SYMBOL_GPL(ide_intr);
 
 /**
  *     ide_do_drive_cmd        -       issue IDE special command
index ce0818a993f68a42bf445bc79dea4eaa0ccc94da..ee8e3e7cad51e6b66ce1737d263633e947e6e29c 100644 (file)
@@ -950,6 +950,7 @@ static int ide_port_setup_devices(ide_hwif_t *hwif)
 static int init_irq (ide_hwif_t *hwif)
 {
        struct ide_io_ports *io_ports = &hwif->io_ports;
+       irq_handler_t irq_handler;
        int sa = 0;
 
        mutex_lock(&ide_cfg_mtx);
@@ -959,6 +960,10 @@ static int init_irq (ide_hwif_t *hwif)
        hwif->timer.function = &ide_timer_expiry;
        hwif->timer.data = (unsigned long)hwif;
 
+       irq_handler = hwif->host->irq_handler;
+       if (irq_handler == NULL)
+               irq_handler = ide_intr;
+
 #if defined(__mc68000__)
        sa = IRQF_SHARED;
 #endif /* __mc68000__ */
@@ -969,7 +974,7 @@ 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))
+       if (request_irq(hwif->irq, irq_handler, sa, hwif->name, hwif))
                goto out_up;
 
        if (!hwif->rqsize) {
index fe235b65207ee74d43e74818d94bdaf6759816d5..e0cedfe9fad46b63d13fad9ce0a006d5e75fecd3 100644 (file)
@@ -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 */