diff options
Diffstat (limited to 'firmware/ata.c')
-rw-r--r-- | firmware/ata.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/firmware/ata.c b/firmware/ata.c index 460808a217..cb4e1e6b90 100644 --- a/firmware/ata.c +++ b/firmware/ata.c | |||
@@ -84,7 +84,7 @@ static int wait_for_end_of_transfer(void) | |||
84 | 84 | ||
85 | int ata_read_sectors(unsigned long start, | 85 | int ata_read_sectors(unsigned long start, |
86 | unsigned char count, | 86 | unsigned char count, |
87 | unsigned short* buf) | 87 | void* buf) |
88 | { | 88 | { |
89 | int i; | 89 | int i; |
90 | 90 | ||
@@ -106,7 +106,7 @@ int ata_read_sectors(unsigned long start, | |||
106 | return 0; | 106 | return 0; |
107 | 107 | ||
108 | for (j=0; j<256; j++) | 108 | for (j=0; j<256; j++) |
109 | buf[j] = SWAB16(ATA_DATA); | 109 | ((unsigned short*)buf)[j] = SWAB16(ATA_DATA); |
110 | } | 110 | } |
111 | 111 | ||
112 | led_turn_off(); | 112 | led_turn_off(); |
@@ -116,7 +116,7 @@ int ata_read_sectors(unsigned long start, | |||
116 | 116 | ||
117 | int ata_write_sectors(unsigned long start, | 117 | int ata_write_sectors(unsigned long start, |
118 | unsigned char count, | 118 | unsigned char count, |
119 | unsigned short* buf) | 119 | void* buf) |
120 | { | 120 | { |
121 | int i; | 121 | int i; |
122 | 122 | ||
@@ -138,7 +138,7 @@ int ata_write_sectors(unsigned long start, | |||
138 | return 0; | 138 | return 0; |
139 | 139 | ||
140 | for (j=0; j<256; j++) | 140 | for (j=0; j<256; j++) |
141 | ATA_DATA = SWAB16(buf[j]); | 141 | ATA_DATA = SWAB16(((unsigned short*)buf)[j]); |
142 | } | 142 | } |
143 | 143 | ||
144 | led_turn_off (); | 144 | led_turn_off (); |