diff options
author | Sergei Shtylyov <sshtylyov@ru.mvista.com> | 2009-03-31 20:15:31 +0200 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-03-31 20:15:31 +0200 |
commit | bac08cee93f9cb37b40ecfa8eaf1f6d8daf3909b (patch) | |
tree | e3a5a3dd993077d64e16699e866e37ad66d652c8 /drivers/ide/ns87415.c | |
parent | ide-io-std: shorten ide_{in|out}put_data() (diff) | |
download | linux-bac08cee93f9cb37b40ecfa8eaf1f6d8daf3909b.tar.xz linux-bac08cee93f9cb37b40ecfa8eaf1f6d8daf3909b.zip |
ide: call {in|out}put_data() methods from tf_{read|load}() methods (take 2)
Handle IDE_FTFLAG_{IN|OUT}_DATA flags in tf_{read|load}() methods by calling
{in|out}put_data() methods to transfer 2 bytes -- this will allow us to move
that handling out of those methods altogether...
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ns87415.c')
-rw-r--r-- | drivers/ide/ns87415.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/ide/ns87415.c b/drivers/ide/ns87415.c index 0a6cf74c3265..7d64bc079fa8 100644 --- a/drivers/ide/ns87415.c +++ b/drivers/ide/ns87415.c @@ -67,10 +67,12 @@ static void superio_tf_read(ide_drive_t *drive, struct ide_cmd *cmd) struct ide_taskfile *tf = &cmd->tf; if (cmd->ftf_flags & IDE_FTFLAG_IN_DATA) { - u16 data = inw(io_ports->data_addr); + u8 data[2]; - tf->data = data & 0xff; - tf->hob_data = (data >> 8) & 0xff; + ide_input_data(drive, cmd, data, 2); + + tf->data = data[0]; + tf->hob_data = data[1]; } /* be sure we're looking at the low order bits */ |