]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
libata: make ata_port_queue_task() an internal function
authorJeff Garzik <jeff@garzik.org>
Wed, 19 Dec 2007 09:25:10 +0000 (04:25 -0500)
committerJeff Garzik <jeff@garzik.org>
Wed, 23 Jan 2008 10:24:15 +0000 (05:24 -0500)
ata_port_queue_task() served a single user:  ata_pio_task()

Rename to ata_pio_queue_task() and un-export it, as nobody outside of
libata-core.c uses it.

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
drivers/ata/libata-core.c
include/linux/libata.h

index 627703cba9a6a772df36386cb77f9eda3d28fc62..4020a1d3eb2c0c8cd1f9dd32380e5ae7d8c78b8e 100644 (file)
@@ -1480,7 +1480,7 @@ unsigned long ata_id_xfermask(const u16 *id)
 }
 
 /**
- *     ata_port_queue_task - Queue port_task
+ *     ata_pio_queue_task - Queue port_task
  *     @ap: The ata_port to queue port_task for
  *     @fn: workqueue function to be scheduled
  *     @data: data for @fn to use
@@ -1492,16 +1492,15 @@ unsigned long ata_id_xfermask(const u16 *id)
  *     one task is active at any given time.
  *
  *     libata core layer takes care of synchronization between
- *     port_task and EH.  ata_port_queue_task() may be ignored for EH
+ *     port_task and EH.  ata_pio_queue_task() may be ignored for EH
  *     synchronization.
  *
  *     LOCKING:
  *     Inherited from caller.
  */
-void ata_port_queue_task(struct ata_port *ap, work_func_t fn, void *data,
-                        unsigned long delay)
+static void ata_pio_queue_task(struct ata_port *ap, void *data,
+                              unsigned long delay)
 {
-       PREPARE_DELAYED_WORK(&ap->port_task, fn);
        ap->port_task_data = data;
 
        /* may fail if ata_port_flush_task() in progress */
@@ -5618,7 +5617,7 @@ fsm_start:
                msleep(2);
                status = ata_busy_wait(ap, ATA_BUSY, 10);
                if (status & ATA_BUSY) {
-                       ata_port_queue_task(ap, ata_pio_task, qc, ATA_SHORT_PAUSE);
+                       ata_pio_queue_task(ap, qc, ATA_SHORT_PAUSE);
                        return;
                }
        }
@@ -6041,7 +6040,7 @@ unsigned int ata_qc_issue_prot(struct ata_queued_cmd *qc)
                ap->hsm_task_state = HSM_ST_LAST;
 
                if (qc->tf.flags & ATA_TFLAG_POLLING)
-                       ata_port_queue_task(ap, ata_pio_task, qc, 0);
+                       ata_pio_queue_task(ap, qc, 0);
 
                break;
 
@@ -6063,7 +6062,7 @@ unsigned int ata_qc_issue_prot(struct ata_queued_cmd *qc)
                if (qc->tf.flags & ATA_TFLAG_WRITE) {
                        /* PIO data out protocol */
                        ap->hsm_task_state = HSM_ST_FIRST;
-                       ata_port_queue_task(ap, ata_pio_task, qc, 0);
+                       ata_pio_queue_task(ap, qc, 0);
 
                        /* always send first data block using
                         * the ata_pio_task() codepath.
@@ -6073,7 +6072,7 @@ unsigned int ata_qc_issue_prot(struct ata_queued_cmd *qc)
                        ap->hsm_task_state = HSM_ST;
 
                        if (qc->tf.flags & ATA_TFLAG_POLLING)
-                               ata_port_queue_task(ap, ata_pio_task, qc, 0);
+                               ata_pio_queue_task(ap, qc, 0);
 
                        /* if polling, ata_pio_task() handles the rest.
                         * otherwise, interrupt handler takes over from here.
@@ -6094,7 +6093,7 @@ unsigned int ata_qc_issue_prot(struct ata_queued_cmd *qc)
                /* send cdb by polling if no cdb interrupt */
                if ((!(qc->dev->flags & ATA_DFLAG_CDB_INTR)) ||
                    (qc->tf.flags & ATA_TFLAG_POLLING))
-                       ata_port_queue_task(ap, ata_pio_task, qc, 0);
+                       ata_pio_queue_task(ap, qc, 0);
                break;
 
        case ATAPI_PROT_DMA:
@@ -6106,7 +6105,7 @@ unsigned int ata_qc_issue_prot(struct ata_queued_cmd *qc)
 
                /* send cdb by polling if no cdb interrupt */
                if (!(qc->dev->flags & ATA_DFLAG_CDB_INTR))
-                       ata_port_queue_task(ap, ata_pio_task, qc, 0);
+                       ata_pio_queue_task(ap, qc, 0);
                break;
 
        default:
@@ -6722,7 +6721,7 @@ struct ata_port *ata_port_alloc(struct ata_host *host)
        ap->msg_enable = ATA_MSG_DRV | ATA_MSG_ERR | ATA_MSG_WARN;
 #endif
 
-       INIT_DELAYED_WORK(&ap->port_task, NULL);
+       INIT_DELAYED_WORK(&ap->port_task, ata_pio_task);
        INIT_DELAYED_WORK(&ap->hotplug_task, ata_scsi_hotplug);
        INIT_WORK(&ap->scsi_rescan_task, ata_scsi_dev_rescan);
        INIT_LIST_HEAD(&ap->eh_done_q);
@@ -7599,7 +7598,6 @@ EXPORT_SYMBOL_GPL(ata_wait_register);
 EXPORT_SYMBOL_GPL(ata_busy_sleep);
 EXPORT_SYMBOL_GPL(ata_wait_after_reset);
 EXPORT_SYMBOL_GPL(ata_wait_ready);
-EXPORT_SYMBOL_GPL(ata_port_queue_task);
 EXPORT_SYMBOL_GPL(ata_scsi_ioctl);
 EXPORT_SYMBOL_GPL(ata_scsi_queuecmd);
 EXPORT_SYMBOL_GPL(ata_scsi_slave_config);
index 7b7c78e42077e7fc55027e879025db51a5a933ec..ccb055636f37b308b36287626f2bb48fa13dbfaa 100644 (file)
@@ -847,8 +847,6 @@ extern int ata_busy_sleep(struct ata_port *ap,
                          unsigned long timeout_pat, unsigned long timeout);
 extern void ata_wait_after_reset(struct ata_port *ap, unsigned long deadline);
 extern int ata_wait_ready(struct ata_port *ap, unsigned long deadline);
-extern void ata_port_queue_task(struct ata_port *ap, work_func_t fn,
-                               void *data, unsigned long delay);
 extern u32 ata_wait_register(void __iomem *reg, u32 mask, u32 val,
                             unsigned long interval_msec,
                             unsigned long timeout_msec);