aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-io.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-03-27 07:46:37 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-03-27 07:46:37 -0400
commit22aa4b32a19b1f231d4ce7e9af6354b577a22a35 (patch)
tree3e773e7102e4ea6bb6b4c00edce442c4e8f37edb /drivers/ide/ide-io.c
parente6830a86c260d73c6f370aa7ed17ee6c71e5ee05 (diff)
ide: remove ide_task_t typedef
While at it: - rename struct ide_task_s to struct ide_cmd - remove stale comments from idedisk_{read_native,set}_max_address() - drop unused 'cmd' argument from ide_{cmd,task}_ioctl() - drop unused 'task' argument from tx4939ide_tf_load_fixup() - rename ide_complete_task() to ide_complete_cmd() - use consistent naming for struct ide_cmd variables There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-io.c')
-rw-r--r--drivers/ide/ide-io.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c
index 6eee41beec73..2900271c6ddd 100644
--- a/drivers/ide/ide-io.c
+++ b/drivers/ide/ide-io.c
@@ -144,21 +144,21 @@ int ide_end_dequeued_request(ide_drive_t *drive, struct request *rq,
144} 144}
145EXPORT_SYMBOL_GPL(ide_end_dequeued_request); 145EXPORT_SYMBOL_GPL(ide_end_dequeued_request);
146 146
147void ide_complete_task(ide_drive_t *drive, ide_task_t *task, u8 stat, u8 err) 147void ide_complete_cmd(ide_drive_t *drive, struct ide_cmd *cmd, u8 stat, u8 err)
148{ 148{
149 struct ide_taskfile *tf = &task->tf; 149 struct ide_taskfile *tf = &cmd->tf;
150 struct request *rq = task->rq; 150 struct request *rq = cmd->rq;
151 151
152 tf->error = err; 152 tf->error = err;
153 tf->status = stat; 153 tf->status = stat;
154 154
155 drive->hwif->tp_ops->tf_read(drive, task); 155 drive->hwif->tp_ops->tf_read(drive, cmd);
156 156
157 if (rq && rq->cmd_type == REQ_TYPE_ATA_TASKFILE) 157 if (rq && rq->cmd_type == REQ_TYPE_ATA_TASKFILE)
158 memcpy(rq->special, task, sizeof(*task)); 158 memcpy(rq->special, cmd, sizeof(*cmd));
159 159
160 if (task->tf_flags & IDE_TFLAG_DYN) 160 if (cmd->tf_flags & IDE_TFLAG_DYN)
161 kfree(task); 161 kfree(cmd);
162} 162}
163 163
164void ide_complete_rq(ide_drive_t *drive, u8 err) 164void ide_complete_rq(ide_drive_t *drive, u8 err)
@@ -217,20 +217,20 @@ static void ide_tf_set_setmult_cmd(ide_drive_t *drive, struct ide_taskfile *tf)
217static ide_startstop_t ide_disk_special(ide_drive_t *drive) 217static ide_startstop_t ide_disk_special(ide_drive_t *drive)
218{ 218{
219 special_t *s = &drive->special; 219 special_t *s = &drive->special;
220 ide_task_t args; 220 struct ide_cmd cmd;
221 221
222 memset(&args, 0, sizeof(ide_task_t)); 222 memset(&cmd, 0, sizeof(cmd));
223 args.data_phase = TASKFILE_NO_DATA; 223 cmd.data_phase = TASKFILE_NO_DATA;
224 224
225 if (s->b.set_geometry) { 225 if (s->b.set_geometry) {
226 s->b.set_geometry = 0; 226 s->b.set_geometry = 0;
227 ide_tf_set_specify_cmd(drive, &args.tf); 227 ide_tf_set_specify_cmd(drive, &cmd.tf);
228 } else if (s->b.recalibrate) { 228 } else if (s->b.recalibrate) {
229 s->b.recalibrate = 0; 229 s->b.recalibrate = 0;
230 ide_tf_set_restore_cmd(drive, &args.tf); 230 ide_tf_set_restore_cmd(drive, &cmd.tf);
231 } else if (s->b.set_multmode) { 231 } else if (s->b.set_multmode) {
232 s->b.set_multmode = 0; 232 s->b.set_multmode = 0;
233 ide_tf_set_setmult_cmd(drive, &args.tf); 233 ide_tf_set_setmult_cmd(drive, &cmd.tf);
234 } else if (s->all) { 234 } else if (s->all) {
235 int special = s->all; 235 int special = s->all;
236 s->all = 0; 236 s->all = 0;
@@ -238,10 +238,10 @@ static ide_startstop_t ide_disk_special(ide_drive_t *drive)
238 return ide_stopped; 238 return ide_stopped;
239 } 239 }
240 240
241 args.tf_flags = IDE_TFLAG_TF | IDE_TFLAG_DEVICE | 241 cmd.tf_flags = IDE_TFLAG_TF | IDE_TFLAG_DEVICE |
242 IDE_TFLAG_CUSTOM_HANDLER; 242 IDE_TFLAG_CUSTOM_HANDLER;
243 243
244 do_rw_taskfile(drive, &args); 244 do_rw_taskfile(drive, &cmd);
245 245
246 return ide_started; 246 return ide_started;
247} 247}
@@ -315,10 +315,10 @@ EXPORT_SYMBOL_GPL(ide_init_sg_cmd);
315static ide_startstop_t execute_drive_cmd (ide_drive_t *drive, 315static ide_startstop_t execute_drive_cmd (ide_drive_t *drive,
316 struct request *rq) 316 struct request *rq)
317{ 317{
318 ide_task_t *task = rq->special; 318 struct ide_cmd *cmd = rq->special;
319 319
320 if (task) { 320 if (cmd) {
321 switch (task->data_phase) { 321 switch (cmd->data_phase) {
322 case TASKFILE_MULTI_OUT: 322 case TASKFILE_MULTI_OUT:
323 case TASKFILE_OUT: 323 case TASKFILE_OUT:
324 case TASKFILE_MULTI_IN: 324 case TASKFILE_MULTI_IN:
@@ -329,7 +329,7 @@ static ide_startstop_t execute_drive_cmd (ide_drive_t *drive,
329 break; 329 break;
330 } 330 }
331 331
332 return do_rw_taskfile(drive, task); 332 return do_rw_taskfile(drive, cmd);
333 } 333 }
334 334
335 /* 335 /*