diff options
Diffstat (limited to 'drivers/ata/libata-core.c')
-rw-r--r-- | drivers/ata/libata-core.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 0bb4b4dced76..b5f2da6ac80e 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c | |||
@@ -914,7 +914,7 @@ static unsigned int ata_id_xfermask(const u16 *id) | |||
914 | * ata_port_queue_task - Queue port_task | 914 | * ata_port_queue_task - Queue port_task |
915 | * @ap: The ata_port to queue port_task for | 915 | * @ap: The ata_port to queue port_task for |
916 | * @fn: workqueue function to be scheduled | 916 | * @fn: workqueue function to be scheduled |
917 | * @data: data value to pass to workqueue function | 917 | * @data: data for @fn to use |
918 | * @delay: delay time for workqueue function | 918 | * @delay: delay time for workqueue function |
919 | * | 919 | * |
920 | * Schedule @fn(@data) for execution after @delay jiffies using | 920 | * Schedule @fn(@data) for execution after @delay jiffies using |
@@ -929,7 +929,7 @@ static unsigned int ata_id_xfermask(const u16 *id) | |||
929 | * LOCKING: | 929 | * LOCKING: |
930 | * Inherited from caller. | 930 | * Inherited from caller. |
931 | */ | 931 | */ |
932 | void ata_port_queue_task(struct ata_port *ap, void (*fn)(void *), void *data, | 932 | void ata_port_queue_task(struct ata_port *ap, work_func_t fn, void *data, |
933 | unsigned long delay) | 933 | unsigned long delay) |
934 | { | 934 | { |
935 | int rc; | 935 | int rc; |
@@ -937,7 +937,8 @@ void ata_port_queue_task(struct ata_port *ap, void (*fn)(void *), void *data, | |||
937 | if (ap->pflags & ATA_PFLAG_FLUSH_PORT_TASK) | 937 | if (ap->pflags & ATA_PFLAG_FLUSH_PORT_TASK) |
938 | return; | 938 | return; |
939 | 939 | ||
940 | PREPARE_DELAYED_WORK(&ap->port_task, fn, data); | 940 | PREPARE_DELAYED_WORK(&ap->port_task, fn); |
941 | ap->port_task_data = data; | ||
941 | 942 | ||
942 | rc = queue_delayed_work(ata_wq, &ap->port_task, delay); | 943 | rc = queue_delayed_work(ata_wq, &ap->port_task, delay); |
943 | 944 | ||
@@ -4292,10 +4293,11 @@ fsm_start: | |||
4292 | return poll_next; | 4293 | return poll_next; |
4293 | } | 4294 | } |
4294 | 4295 | ||
4295 | static void ata_pio_task(void *_data) | 4296 | static void ata_pio_task(struct work_struct *work) |
4296 | { | 4297 | { |
4297 | struct ata_queued_cmd *qc = _data; | 4298 | struct ata_port *ap = |
4298 | struct ata_port *ap = qc->ap; | 4299 | container_of(work, struct ata_port, port_task.work); |
4300 | struct ata_queued_cmd *qc = ap->port_task_data; | ||
4299 | u8 status; | 4301 | u8 status; |
4300 | int poll_next; | 4302 | int poll_next; |
4301 | 4303 | ||
@@ -5317,9 +5319,9 @@ void ata_port_init(struct ata_port *ap, struct ata_host *host, | |||
5317 | ap->msg_enable = ATA_MSG_DRV | ATA_MSG_ERR | ATA_MSG_WARN; | 5319 | ap->msg_enable = ATA_MSG_DRV | ATA_MSG_ERR | ATA_MSG_WARN; |
5318 | #endif | 5320 | #endif |
5319 | 5321 | ||
5320 | INIT_DELAYED_WORK(&ap->port_task, NULL, NULL); | 5322 | INIT_DELAYED_WORK(&ap->port_task, NULL); |
5321 | INIT_DELAYED_WORK(&ap->hotplug_task, ata_scsi_hotplug, ap); | 5323 | INIT_DELAYED_WORK(&ap->hotplug_task, ata_scsi_hotplug); |
5322 | INIT_WORK(&ap->scsi_rescan_task, ata_scsi_dev_rescan, ap); | 5324 | INIT_WORK(&ap->scsi_rescan_task, ata_scsi_dev_rescan); |
5323 | INIT_LIST_HEAD(&ap->eh_done_q); | 5325 | INIT_LIST_HEAD(&ap->eh_done_q); |
5324 | init_waitqueue_head(&ap->eh_wait_q); | 5326 | init_waitqueue_head(&ap->eh_wait_q); |
5325 | 5327 | ||