diff options
Diffstat (limited to 'drivers/w1/w1_io.c')
-rw-r--r-- | drivers/w1/w1_io.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/w1/w1_io.c b/drivers/w1/w1_io.c index 0d15b0eaf79a..5139c25ca962 100644 --- a/drivers/w1/w1_io.c +++ b/drivers/w1/w1_io.c | |||
@@ -356,7 +356,9 @@ int w1_reset_select_slave(struct w1_slave *sl) | |||
356 | w1_write_8(sl->master, W1_SKIP_ROM); | 356 | w1_write_8(sl->master, W1_SKIP_ROM); |
357 | else { | 357 | else { |
358 | u8 match[9] = {W1_MATCH_ROM, }; | 358 | u8 match[9] = {W1_MATCH_ROM, }; |
359 | memcpy(&match[1], (u8 *)&sl->reg_num, 8); | 359 | u64 rn = le64_to_cpu(*((u64*)&sl->reg_num)); |
360 | |||
361 | memcpy(&match[1], &rn, 8); | ||
360 | w1_write_block(sl->master, match, 9); | 362 | w1_write_block(sl->master, match, 9); |
361 | } | 363 | } |
362 | return 0; | 364 | return 0; |