Commit 849d7130001ab740a5a4778a561049841fdd77c9

Authored by Stanislaw Gruszka
Committed by Bartlomiej Zolnierkiewicz
1 parent a509538d4f

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>

Showing 3 changed files with 8 additions and 1 deletions Side-by-side Diff

drivers/ide/ide-io.c
... ... @@ -1162,6 +1162,7 @@
1162 1162  
1163 1163 return irq_ret;
1164 1164 }
  1165 +EXPORT_SYMBOL_GPL(ide_intr);
1165 1166  
1166 1167 /**
1167 1168 * ide_do_drive_cmd - issue IDE special command
drivers/ide/ide-probe.c
... ... @@ -950,6 +950,7 @@
950 950 static int init_irq (ide_hwif_t *hwif)
951 951 {
952 952 struct ide_io_ports *io_ports = &hwif->io_ports;
  953 + irq_handler_t irq_handler;
953 954 int sa = 0;
954 955  
955 956 mutex_lock(&ide_cfg_mtx);
... ... @@ -959,6 +960,10 @@
959 960 hwif->timer.function = &ide_timer_expiry;
960 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 967 #if defined(__mc68000__)
963 968 sa = IRQF_SHARED;
964 969 #endif /* __mc68000__ */
... ... @@ -969,7 +974,7 @@
969 974 if (io_ports->ctl_addr)
970 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 978 goto out_up;
974 979  
975 980 if (!hwif->rqsize) {
... ... @@ -866,6 +866,7 @@
866 866 unsigned int n_ports;
867 867 struct device *dev[2];
868 868 unsigned int (*init_chipset)(struct pci_dev *);
  869 + irq_handler_t irq_handler;
869 870 unsigned long host_flags;
870 871 void *host_priv;
871 872 ide_hwif_t *cur_port; /* for hosts requiring serialization */