提交 849d7130 编写于 作者: S Stanislaw Gruszka 提交者: Bartlomiej Zolnierkiewicz

ide: allow to wrap interrupt handler

Signed-off-by: NStanislaw Gruszka <stf_xl@wp.pl>
Cc: Andrew Victor <linux@maxim.org.za>
[bart: minor checkpatch.pl / CodingStyle fixups]
Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
上级 a509538d
...@@ -1162,6 +1162,7 @@ irqreturn_t ide_intr (int irq, void *dev_id) ...@@ -1162,6 +1162,7 @@ irqreturn_t ide_intr (int irq, void *dev_id)
return irq_ret; return irq_ret;
} }
EXPORT_SYMBOL_GPL(ide_intr);
/** /**
* ide_do_drive_cmd - issue IDE special command * ide_do_drive_cmd - issue IDE special command
......
...@@ -950,6 +950,7 @@ static int ide_port_setup_devices(ide_hwif_t *hwif) ...@@ -950,6 +950,7 @@ static int ide_port_setup_devices(ide_hwif_t *hwif)
static int init_irq (ide_hwif_t *hwif) static int init_irq (ide_hwif_t *hwif)
{ {
struct ide_io_ports *io_ports = &hwif->io_ports; struct ide_io_ports *io_ports = &hwif->io_ports;
irq_handler_t irq_handler;
int sa = 0; int sa = 0;
mutex_lock(&ide_cfg_mtx); mutex_lock(&ide_cfg_mtx);
...@@ -959,6 +960,10 @@ static int init_irq (ide_hwif_t *hwif) ...@@ -959,6 +960,10 @@ static int init_irq (ide_hwif_t *hwif)
hwif->timer.function = &ide_timer_expiry; hwif->timer.function = &ide_timer_expiry;
hwif->timer.data = (unsigned long)hwif; hwif->timer.data = (unsigned long)hwif;
irq_handler = hwif->host->irq_handler;
if (irq_handler == NULL)
irq_handler = ide_intr;
#if defined(__mc68000__) #if defined(__mc68000__)
sa = IRQF_SHARED; sa = IRQF_SHARED;
#endif /* __mc68000__ */ #endif /* __mc68000__ */
...@@ -969,7 +974,7 @@ static int init_irq (ide_hwif_t *hwif) ...@@ -969,7 +974,7 @@ static int init_irq (ide_hwif_t *hwif)
if (io_ports->ctl_addr) if (io_ports->ctl_addr)
hwif->tp_ops->set_irq(hwif, 1); 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; goto out_up;
if (!hwif->rqsize) { if (!hwif->rqsize) {
......
...@@ -866,6 +866,7 @@ struct ide_host { ...@@ -866,6 +866,7 @@ struct ide_host {
unsigned int n_ports; unsigned int n_ports;
struct device *dev[2]; struct device *dev[2];
unsigned int (*init_chipset)(struct pci_dev *); unsigned int (*init_chipset)(struct pci_dev *);
irq_handler_t irq_handler;
unsigned long host_flags; unsigned long host_flags;
void *host_priv; void *host_priv;
ide_hwif_t *cur_port; /* for hosts requiring serialization */ ide_hwif_t *cur_port; /* for hosts requiring serialization */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册