From aecb338163e2fe55e32d3e2039af737a8bfaaa19 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Pali=20Roh=C3=A1r?= Date: Sun, 3 Apr 2022 00:36:34 +0200 Subject: [PATCH] misc: atsha204a: Fix big endian support MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Callers of function atsha204a_crc16() expect to return value in host cpu endianity. So remove cpu_to_le16() conversion. Signed-off-by: Pali Rohár Reviewed-by: Stefan Roese Reviewed-by: Marek Behún --- drivers/misc/atsha204a-i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/misc/atsha204a-i2c.c b/drivers/misc/atsha204a-i2c.c index b89463babb..63fe541dad 100644 --- a/drivers/misc/atsha204a-i2c.c +++ b/drivers/misc/atsha204a-i2c.c @@ -146,7 +146,7 @@ static u16 atsha204a_crc16(const u8 *buffer, size_t len) while (len--) crc = crc16_byte(crc, *buffer++); - return cpu_to_le16(crc); + return crc; } static int atsha204a_send(struct udevice *dev, const u8 *buf, u8 len) -- 2.39.5