aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/w1
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/w1')
-rw-r--r--drivers/w1/w1_smem.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/w1/w1_smem.c b/drivers/w1/w1_smem.c
index ab82eb7ed74f..a54e425217a0 100644
--- a/drivers/w1/w1_smem.c
+++ b/drivers/w1/w1_smem.c
@@ -60,7 +60,7 @@ static ssize_t w1_smem_read_val(struct device *dev, char *buf)
60 int i; 60 int i;
61 ssize_t count = 0; 61 ssize_t count = 0;
62 62
63 for (i = 0; i < 9; ++i) 63 for (i = 0; i < 8; ++i)
64 count += sprintf(buf + count, "%02x ", ((u8 *)&sl->reg_num)[i]); 64 count += sprintf(buf + count, "%02x ", ((u8 *)&sl->reg_num)[i]);
65 count += sprintf(buf + count, "\n"); 65 count += sprintf(buf + count, "\n");
66 66
@@ -87,7 +87,7 @@ static ssize_t w1_smem_read_bin(struct kobject *kobj, char *buf, loff_t off, siz
87 count = 0; 87 count = 0;
88 goto out; 88 goto out;
89 } 89 }
90 for (i = 0; i < 9; ++i) 90 for (i = 0; i < 8; ++i)
91 count += sprintf(buf + count, "%02x ", ((u8 *)&sl->reg_num)[i]); 91 count += sprintf(buf + count, "%02x ", ((u8 *)&sl->reg_num)[i]);
92 count += sprintf(buf + count, "\n"); 92 count += sprintf(buf + count, "\n");
93 93