diff options
author | Sergei Shtylyov <sshtylyov@ru.mvista.com> | 2009-06-15 18:52:58 +0200 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-06-15 18:52:58 +0200 |
commit | f4d3ffa52a402ec9e8699571cf3811763d284459 (patch) | |
tree | 792c78dbf602af3f35020b041255905a95b917f2 /drivers/ide/macide.c | |
parent | eba8999cefb6b61704d8fa825b7694825a087765 (diff) | |
download | linux-3.10-f4d3ffa52a402ec9e8699571cf3811763d284459.tar.gz linux-3.10-f4d3ffa52a402ec9e8699571cf3811763d284459.tar.bz2 linux-3.10-f4d3ffa52a402ec9e8699571cf3811763d284459.zip |
ide: move ack_intr() method into 'struct ide_port_ops' (take 2)
Move the ack_intr() method into 'struct ide_port_ops', also renaming it to
test_irq() while at it...
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/macide.c')
-rw-r--r-- | drivers/ide/macide.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/ide/macide.c b/drivers/ide/macide.c index 05cdab35a75..505ec43e560 100644 --- a/drivers/ide/macide.c +++ b/drivers/ide/macide.c @@ -53,7 +53,7 @@ volatile unsigned char *ide_ifr = (unsigned char *) (IDE_BASE + IDE_IFR); -int macide_ack_intr(ide_hwif_t* hwif) +int macide_test_irq(ide_hwif_t *hwif) { if (*ide_ifr & 0x20) return 1; @@ -66,7 +66,7 @@ static void macide_clear_irq(ide_drive_t *drive) } static void __init macide_setup_ports(struct ide_hw *hw, unsigned long base, - int irq, ide_ack_intr_t *ack_intr) + int irq) { int i; @@ -78,11 +78,11 @@ static void __init macide_setup_ports(struct ide_hw *hw, unsigned long base, hw->io_ports.ctl_addr = base + IDE_CONTROL; hw->irq = irq; - hw->ack_intr = ack_intr; } static const struct ide_port_ops macide_port_ops = { .clear_irq = macide_clear_irq, + .test_irq = macide_test_irq, }; static const struct ide_port_info macide_port_info = { @@ -101,7 +101,6 @@ static const char *mac_ide_name[] = static int __init macide_init(void) { - ide_ack_intr_t *ack_intr; unsigned long base; int irq; struct ide_hw hw, *hws[] = { &hw }; @@ -113,17 +112,14 @@ static int __init macide_init(void) switch (macintosh_config->ide_type) { case MAC_IDE_QUADRA: base = IDE_BASE; - ack_intr = macide_ack_intr; irq = IRQ_NUBUS_F; break; case MAC_IDE_PB: base = IDE_BASE; - ack_intr = macide_ack_intr; irq = IRQ_NUBUS_C; break; case MAC_IDE_BABOON: base = BABOON_BASE; - ack_intr = NULL; d.port_ops = NULL; irq = IRQ_BABOON_1; break; @@ -134,7 +130,7 @@ static int __init macide_init(void) printk(KERN_INFO "ide: Macintosh %s IDE controller\n", mac_ide_name[macintosh_config->ide_type - 1]); - macide_setup_ports(&hw, base, irq, ack_intr); + macide_setup_ports(&hw, base, irq); return ide_host_add(&d, hws, 1, NULL); } |