Skip to content

Commit

Permalink
[PATCH] w1_smem: w1 ID is only 8 bytes long.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
johnpol@2ka.mipt.ru authored and Greg KH committed Apr 19, 2005
1 parent 8523ff4 commit 0598571
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/w1/w1_smem.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");

Expand All @@ -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");

Expand Down

0 comments on commit 0598571

Please sign in to comment.