diff options
author | Sergei Shtylyov <sshtylyov@ru.mvista.com> | 2009-04-08 08:13:03 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-04-08 08:13:03 -0400 |
commit | 3153c26b54230d025c6d536e8d3015def4524906 (patch) | |
tree | 0dc92136480ddfdd2f52a48045446e9ed95ed077 /include | |
parent | c9ff9e7b64138d87023b733e618f29a1d58543f7 (diff) |
ide: refactor tf_read() method
Simplify tf_read() method, making it deal only with 'struct ide_taskfile' and
the validity flags that the upper layer passes, and factoring out the code that
deals with the high order bytes into ide_tf_readback() to be called from the
only two functions interested, ide_complete_cmd() and ide_dump_sector().
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 <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/ide.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/linux/ide.h b/include/linux/ide.h index 0ba1c6ab97f8..ff65fffb078f 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -625,7 +625,7 @@ struct ide_tp_ops { | |||
625 | 625 | ||
626 | void (*dev_select)(ide_drive_t *); | 626 | void (*dev_select)(ide_drive_t *); |
627 | void (*tf_load)(ide_drive_t *, struct ide_taskfile *, u8); | 627 | void (*tf_load)(ide_drive_t *, struct ide_taskfile *, u8); |
628 | void (*tf_read)(ide_drive_t *, struct ide_cmd *); | 628 | void (*tf_read)(ide_drive_t *, struct ide_taskfile *, u8); |
629 | 629 | ||
630 | void (*input_data)(ide_drive_t *, struct ide_cmd *, | 630 | void (*input_data)(ide_drive_t *, struct ide_cmd *, |
631 | void *, unsigned int); | 631 | void *, unsigned int); |
@@ -1124,6 +1124,7 @@ extern int ide_devset_execute(ide_drive_t *drive, | |||
1124 | void ide_complete_cmd(ide_drive_t *, struct ide_cmd *, u8, u8); | 1124 | void ide_complete_cmd(ide_drive_t *, struct ide_cmd *, u8, u8); |
1125 | int ide_complete_rq(ide_drive_t *, int, unsigned int); | 1125 | int ide_complete_rq(ide_drive_t *, int, unsigned int); |
1126 | 1126 | ||
1127 | void ide_tf_readback(ide_drive_t *drive, struct ide_cmd *cmd); | ||
1127 | void ide_tf_dump(const char *, struct ide_cmd *); | 1128 | void ide_tf_dump(const char *, struct ide_cmd *); |
1128 | 1129 | ||
1129 | void ide_exec_command(ide_hwif_t *, u8); | 1130 | void ide_exec_command(ide_hwif_t *, u8); |
@@ -1133,7 +1134,7 @@ void ide_write_devctl(ide_hwif_t *, u8); | |||
1133 | 1134 | ||
1134 | void ide_dev_select(ide_drive_t *); | 1135 | void ide_dev_select(ide_drive_t *); |
1135 | void ide_tf_load(ide_drive_t *, struct ide_taskfile *, u8); | 1136 | void ide_tf_load(ide_drive_t *, struct ide_taskfile *, u8); |
1136 | void ide_tf_read(ide_drive_t *, struct ide_cmd *); | 1137 | void ide_tf_read(ide_drive_t *, struct ide_taskfile *, u8); |
1137 | 1138 | ||
1138 | void ide_input_data(ide_drive_t *, struct ide_cmd *, void *, unsigned int); | 1139 | void ide_input_data(ide_drive_t *, struct ide_cmd *, void *, unsigned int); |
1139 | void ide_output_data(ide_drive_t *, struct ide_cmd *, void *, unsigned int); | 1140 | void ide_output_data(ide_drive_t *, struct ide_cmd *, void *, unsigned int); |