瀏覽代碼

scsi/ahci: ata id little endian fix

The ata id string always needs swapping, not just on BE machines.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Rob Herring 14 年之前
父節點
當前提交
e5a6c79d42
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/block/ahci.c

+ 1 - 1
drivers/block/ahci.c

@@ -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;
 }