aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/w1
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/w1')
-rw-r--r--drivers/w1/masters/Kconfig2
-rw-r--r--drivers/w1/w1_io.c4
2 files changed, 4 insertions, 2 deletions
diff --git a/drivers/w1/masters/Kconfig b/drivers/w1/masters/Kconfig
index a14d5b6e4c7c..90616822cd20 100644
--- a/drivers/w1/masters/Kconfig
+++ b/drivers/w1/masters/Kconfig
@@ -36,7 +36,7 @@ config W1_MASTER_DS2482
36 36
37config W1_MASTER_DS1WM 37config W1_MASTER_DS1WM
38 tristate "Maxim DS1WM 1-wire busmaster" 38 tristate "Maxim DS1WM 1-wire busmaster"
39 depends on W1 && ARM 39 depends on W1 && ARM && HAVE_CLK
40 help 40 help
41 Say Y here to enable the DS1WM 1-wire driver, such as that 41 Say Y here to enable the DS1WM 1-wire driver, such as that
42 in HP iPAQ devices like h5xxx, h2200, and ASIC3-based like 42 in HP iPAQ devices like h5xxx, h2200, and ASIC3-based like
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;