Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1691079 > unrolled thread

[PATCH] w1:fix byteorder of W1_READ_ROM id under big-endian cpu

Started byChen Lin <chen.lin5@zte.com.cn>
First post2017-07-19 09:50 +0200
Last post2017-07-19 09:50 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH] w1:fix byteorder of W1_READ_ROM id under big-endian cpu Chen Lin <chen.lin5@zte.com.cn> - 2017-07-19 09:50 +0200

#1691079 — [PATCH] w1:fix byteorder of W1_READ_ROM id under big-endian cpu

FromChen Lin <chen.lin5@zte.com.cn>
Date2017-07-19 09:50 +0200
Subject[PATCH] w1:fix byteorder of W1_READ_ROM id under big-endian cpu
Message-ID<u4RU7-5ro-41@gated-at.bofh.it>
Signed-off-by: Chen Lin <chen.lin5@zte.com.cn>
Reviewed-by: Jiang Biao <jiang.biao2@zte.com.cn>
---
 drivers/w1/w1.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/w1/w1.c b/drivers/w1/w1.c
index 95ea7e6..c531545 100644
--- a/drivers/w1/w1.c
+++ b/drivers/w1/w1.c
@@ -979,7 +979,7 @@ void w1_search(struct w1_master *dev, u8 search_type, w1_slave_found_callback cb
 			mutex_unlock(&dev->bus_mutex);
 
 			if (rv == 8 && rn)
-				cb(dev, rn);
+				cb(dev, le64_to_cpu(rn));
 
 			break;
 		}
-- 
1.8.3.1

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web