scsi/ahci: ata id little endian fix
authorRob Herring <rob.herring@calxeda.com>
Wed, 1 Jun 2011 09:10:26 +0000 (09:10 +0000)
committerWolfgang Denk <wd@denx.de>
Mon, 25 Jul 2011 22:06:08 +0000 (00:06 +0200)
The ata id string always needs swapping, not just on BE machines.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
drivers/block/ahci.c

index a3ca2dc..d431c5a 100644 (file)
@@ -468,7 +468,7 @@ static char *ata_id_strcpy(u16 *target, u16 *src, int len)
 {
        int i;
        for (i = 0; i < len / 2; i++)
-               target[i] = le16_to_cpu(src[i]);
+               target[i] = swab16(src[i]);
        return (char *)target;
 }