kernel_optimize_test/drivers/w1
David Fries 6b355b33a6 w1: fix w1_send_slave dropping a slave id
Previous logic,
if (avail > 8) {
	store slave;
	return;
}
send data; clear;

The logic error is, if there isn't space send the buffer and clear,
but the slave wasn't added to the now empty buffer loosing that slave
id.  It also should have been "if (avail >= 8)" because when it is 8,
there is space.

Instead, if there isn't space send and clear the buffer, then there is
always space for the slave id.

Signed-off-by: David Fries <David@Fries.net>
Cc: stable@vger.kernel.org
Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-07 15:40:17 -08:00
..
masters drivers/w1/masters/w1-gpio.c: add strong pullup emulation 2014-01-23 16:37:04 -08:00
slaves
Kconfig
Makefile
w1_family.c
w1_family.h
w1_int.c drivers/w1/masters/w1-gpio.c: add strong pullup emulation 2014-01-23 16:37:04 -08:00
w1_int.h
w1_io.c
w1_log.h
w1_netlink.c w1: fix w1_send_slave dropping a slave id 2014-02-07 15:40:17 -08:00
w1_netlink.h
w1.c drivers: w1: make w1_slave::flags long to avoid memory corruption 2013-11-13 12:09:35 +09:00
w1.h drivers: w1: make w1_slave::flags long to avoid memory corruption 2013-11-13 12:09:35 +09:00