Skip to contentSkip to conversation

char: use get/put_endian helpers

PATCH In review Harvey Harrison 1 participant 1 message May 29, 2008

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 8/37 char: use get/put_endian helpers

---
 drivers/char/pcmcia/cm4040_cs.c |    2 +-
 drivers/char/tpm/tpm_tis.c      |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/char/pcmcia/cm4040_cs.c +1 -1
index 035084c..450d329 100644
@@ -268,7 +268,7 @@ static ssize_t cm4040_read(struct file *filp, char __user *buf,
 	}
 #endif
 
-	bytes_to_read = 5 + le32_to_cpu(*(__le32 *)&dev->r_buf[1]);
+	bytes_to_read = 5 + get_le32((__le32 *)&dev->r_buf[1]);
 
 	DEBUGP(6, dev, "BytesToRead=%lu\n", bytes_to_read);
 
drivers/char/tpm/tpm_tis.c +1 -1
index 13a4bdd..128148e 100644
@@ -228,7 +228,7 @@ static int tpm_tis_recv(struct tpm_chip *chip, u8 *buf, size_t count)
 		goto out;
 	}
 
-	expected = be32_to_cpu(*(__be32 *) (buf + 2));
+	expected = get_be32((__be32 *)(buf + 2));
 	if (expected > count) {
 		size = -EIO;
 		goto out;
Signature · 1 line
1.5.6.rc0.277.g804cf