]> git.baikalelectronics.ru Git - kernel.git/commit
W1: w1_slave_read_id read bug, use device_attribute
authorDavid Fries <david@fries.net>
Thu, 16 Oct 2008 05:04:50 +0000 (22:04 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 16 Oct 2008 18:21:50 +0000 (11:21 -0700)
commite4f08f24846cab5d9fc85072c74651fd70346a17
tree2b5ea6b20ec8c456fcb686f13c3607cfcd15e8ff
parentadd75b3de7ca693679fc0e140b8a5a868e45ab78
W1: w1_slave_read_id read bug, use device_attribute

Fix bug reading the id sysfs file.  If less than the full 8 bytes were
read, the next read would start at the first byte instead of continuing.
It needed the offset added to memcpy, or the better solution was to
replace it with the device attribute instead of bin attribute.

Signed-off-by: David Fries <david@fries.net>
Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/w1/w1.c