[PATCH] w1_smem: w1 ID is only 8 bytes long.
w1 ID is only 8 bytes long.
Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
diff --git a/drivers/w1/w1_smem.c b/drivers/w1/w1_smem.c
index ab82eb7..a54e425 100644
--- a/drivers/w1/w1_smem.c
+++ b/drivers/w1/w1_smem.c
@@ -60,7 +60,7 @@
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 @@
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");