提交 05985715 编写于 作者: J johnpol@2ka.mipt.ru 提交者: Greg KH

[PATCH] w1_smem: w1 ID is only 8 bytes long.

w1 ID is only 8 bytes long.
Signed-off-by: NEvgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 8523ff45
......@@ -60,7 +60,7 @@ static ssize_t w1_smem_read_val(struct device *dev, char *buf)
int i;
ssize_t count = 0;
for (i = 0; i < 9; ++i)
for (i = 0; i < 8; ++i)
count += sprintf(buf + count, "%02x ", ((u8 *)&sl->reg_num)[i]);
count += sprintf(buf + count, "\n");
......@@ -87,7 +87,7 @@ static ssize_t w1_smem_read_bin(struct kobject *kobj, char *buf, loff_t off, siz
count = 0;
goto out;
}
for (i = 0; i < 9; ++i)
for (i = 0; i < 8; ++i)
count += sprintf(buf + count, "%02x ", ((u8 *)&sl->reg_num)[i]);
count += sprintf(buf + count, "\n");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册