From c9ff9e7b64138d87023b733e618f29a1d58543f7 Mon Sep 17 00:00:00 2001 From: Sergei Shtylyov Date: Wed, 8 Apr 2009 14:13:03 +0200 Subject: ide: refactor tf_load() method Simplify tf_load() method, making it deal only with 'struct ide_taskfile' and the validity flags that the upper layer passes, and moving the code that deals with the high order bytes into the only function interested, do_rw_taskfile(). This should stop the needless code duplication in this method and so make it about twice smaller than it was; along with simplifying the setup for the method call, this should save both time and space... Signed-off-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz --- drivers/ide/ide-taskfile.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers/ide/ide-taskfile.c') diff --git a/drivers/ide/ide-taskfile.c b/drivers/ide/ide-taskfile.c index 0318a4cb09de..b1806ed46175 100644 --- a/drivers/ide/ide-taskfile.c +++ b/drivers/ide/ide-taskfile.c @@ -98,7 +98,8 @@ ide_startstop_t do_rw_taskfile(ide_drive_t *drive, struct ide_cmd *orig_cmd) cmd->tf.device |= drive->select; } - tp_ops->tf_load(drive, cmd); + tp_ops->tf_load(drive, &cmd->hob, cmd->valid.out.hob); + tp_ops->tf_load(drive, &cmd->tf, cmd->valid.out.tf); } switch (cmd->protocol) { -- cgit v1.2.3