diff options
author | Juan Quintela <quintela@redhat.com> | 2009-10-07 17:58:34 +0200 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2009-10-27 12:28:44 -0500 |
commit | 96c35cebfe63c3fd1e628ddcf82309dd9bd00cab (patch) | |
tree | 9ceafce3f766ed733570b762555625cf465b413f /hw/ide/core.c | |
parent | 6521dc629c97637af7e734f6975a6f8746e4cd84 (diff) |
ide: change identify_data type to uint8_t
It is used everywhere as uint8_t except in one place. Cast to uint16_t
in that place
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/ide/core.c')
-rw-r--r-- | hw/ide/core.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/hw/ide/core.c b/hw/ide/core.c index e1433b2b2e..aeff0344a9 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -1942,28 +1942,29 @@ void ide_ioport_write(void *opaque, uint32_t addr, uint32_t val) break; case 0x03: { /* set transfer mode */ uint8_t val = s->nsector & 0x07; + uint16_t *identify_data = (uint16_t *)s->identify_data; switch (s->nsector >> 3) { case 0x00: /* pio default */ case 0x01: /* pio mode */ - put_le16(s->identify_data + 62,0x07); - put_le16(s->identify_data + 63,0x07); - put_le16(s->identify_data + 88,0x3f); + put_le16(identify_data + 62,0x07); + put_le16(identify_data + 63,0x07); + put_le16(identify_data + 88,0x3f); break; case 0x02: /* sigle word dma mode*/ - put_le16(s->identify_data + 62,0x07 | (1 << (val + 8))); - put_le16(s->identify_data + 63,0x07); - put_le16(s->identify_data + 88,0x3f); + put_le16(identify_data + 62,0x07 | (1 << (val + 8))); + put_le16(identify_data + 63,0x07); + put_le16(identify_data + 88,0x3f); break; case 0x04: /* mdma mode */ - put_le16(s->identify_data + 62,0x07); - put_le16(s->identify_data + 63,0x07 | (1 << (val + 8))); - put_le16(s->identify_data + 88,0x3f); + put_le16(identify_data + 62,0x07); + put_le16(identify_data + 63,0x07 | (1 << (val + 8))); + put_le16(identify_data + 88,0x3f); break; case 0x08: /* udma mode */ - put_le16(s->identify_data + 62,0x07); - put_le16(s->identify_data + 63,0x07); - put_le16(s->identify_data + 88,0x3f | (1 << (val + 8))); + put_le16(identify_data + 62,0x07); + put_le16(identify_data + 63,0x07); + put_le16(identify_data + 88,0x3f | (1 << (val + 8))); break; default: goto abort_cmd; |