Skip to contentSkip to conversation

atm: use get/put_endian helpers

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

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

PATCH 6/37 atm: use get/put_endian helpers

---
 drivers/atm/lanai.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
drivers/atm/lanai.c +3 -3
index 144a49f..305f5cf 100644
@@ -949,7 +949,7 @@ static int __devinit eeprom_read(struct lanai_dev *lanai)
 /* read a big-endian 4-byte value out of eeprom */
 static inline u32 eeprom_be4(const struct lanai_dev *lanai, int address)
 {
-	return be32_to_cpup((const u32 *) &lanai->eeprom[address]);
+	return get_be32((__be32 *)&lanai->eeprom[address]);
 }
 
 /* Checksum/validate EEPROM contents */
@@ -1409,7 +1409,7 @@ static void vcc_rx_aal5(struct lanai_vcc *lvcc, int endptr)
 	 * changes have arrived
 	 */
 	rmb();
-	size = be32_to_cpup(x) & 0xffff;
+	size = get_be32(x) & 0xffff;
 	if (unlikely(n != aal5_size(size))) {
 		/* Make sure size matches padding */
 		printk(KERN_INFO DEV_LABEL "(itf %d): Got bad AAL5 length "
@@ -1729,7 +1729,7 @@ static void run_service(struct lanai_dev *lanai)
 	const u32 *end = lanai->service.start + wreg;
 	while (lanai->service.ptr != end) {
 		ntx += handle_service(lanai,
-		    le32_to_cpup(lanai->service.ptr++));
+		    get_le32(lanai->service.ptr++));
 		if (lanai->service.ptr >= lanai->service.end)
 			lanai->service.ptr = lanai->service.start;
 	}
Signature · 1 line
1.5.6.rc0.277.g804cf