[PATCH] libata: move ata_irq_on() into libata-sff.c
authorTejun Heo <htejun@gmail.com>
Mon, 9 Oct 2006 02:10:26 +0000 (11:10 +0900)
committerJeff Garzik <jeff@garzik.org>
Sat, 2 Dec 2006 03:40:28 +0000 (22:40 -0500)
ata_irq_on() isn't used outside of libata core layer.  The function is
TF/SFF interface specific but currently used by core path with some
hack too.  Move it from include/linux/libata.h to
drivers/ata/libata-sff.c.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/ata/libata-sff.c
drivers/ata/libata.h
include/linux/libata.h

index e178d6a..37471d3 100644 (file)
 
 #include "libata.h"
 
+/**
+ *     ata_irq_on - Enable interrupts on a port.
+ *     @ap: Port on which interrupts are enabled.
+ *
+ *     Enable interrupts on a legacy IDE device using MMIO or PIO,
+ *     wait for idle, clear any pending interrupts.
+ *
+ *     LOCKING:
+ *     Inherited from caller.
+ */
+u8 ata_irq_on(struct ata_port *ap)
+{
+       struct ata_ioports *ioaddr = &ap->ioaddr;
+       u8 tmp;
+
+       ap->ctl &= ~ATA_NIEN;
+       ap->last_ctl = ap->ctl;
+
+       if (ap->flags & ATA_FLAG_MMIO)
+               writeb(ap->ctl, (void __iomem *) ioaddr->ctl_addr);
+       else
+               outb(ap->ctl, ioaddr->ctl_addr);
+       tmp = ata_wait_idle(ap);
+
+       ap->ops->irq_clear(ap);
+
+       return tmp;
+}
+
 /**
  *     ata_tf_load_pio - send taskfile registers to host controller
  *     @ap: Port to which output is sent
index 0ed263b..c833000 100644 (file)
@@ -120,4 +120,7 @@ extern void ata_scsi_error(struct Scsi_Host *host);
 extern void ata_port_wait_eh(struct ata_port *ap);
 extern void ata_qc_schedule_eh(struct ata_queued_cmd *qc);
 
+/* libata-sff.c */
+extern u8 ata_irq_on(struct ata_port *ap);
+
 #endif /* __LIBATA_H__ */
index 6c003d8..d3bf7b9 100644 (file)
@@ -1149,37 +1149,6 @@ static inline void ata_qc_reinit(struct ata_queued_cmd *qc)
        qc->result_tf.feature = 0;
 }
 
-/**
- *     ata_irq_on - Enable interrupts on a port.
- *     @ap: Port on which interrupts are enabled.
- *
- *     Enable interrupts on a legacy IDE device using MMIO or PIO,
- *     wait for idle, clear any pending interrupts.
- *
- *     LOCKING:
- *     Inherited from caller.
- */
-
-static inline u8 ata_irq_on(struct ata_port *ap)
-{
-       struct ata_ioports *ioaddr = &ap->ioaddr;
-       u8 tmp;
-
-       ap->ctl &= ~ATA_NIEN;
-       ap->last_ctl = ap->ctl;
-
-       if (ap->flags & ATA_FLAG_MMIO)
-               writeb(ap->ctl, (void __iomem *) ioaddr->ctl_addr);
-       else
-               outb(ap->ctl, ioaddr->ctl_addr);
-       tmp = ata_wait_idle(ap);
-
-       ap->ops->irq_clear(ap);
-
-       return tmp;
-}
-
-
 /**
  *     ata_irq_ack - Acknowledge a device interrupt.
  *     @ap: Port on which interrupts are enabled.