android_kernel_google_msm/drivers/w1
David Fries 6733ac5814 w1: fix w1_send_slave dropping a slave id
commit 6b355b33a6 upstream.

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>
Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-06 07:51:41 -07:00
..
masters w1: Use linux/gpio.h rather than asm/gpio.h 2012-02-09 08:36:05 -08:00
slaves DS2781 Maxim Stand-Alone Fuel Gauge battery and w1 slave drivers 2012-03-08 11:15:33 -08:00
Kconfig
Makefile
w1.c w1: fix oops when w1_search is called from netlink connector 2013-03-20 13:04:59 -07:00
w1.h MAINTAINERS: Evgeniy has moved 2011-08-25 16:25:33 -07:00
w1_family.c drivers/w1: Add export.h for EXPORT_SYMBOL/THIS_MODULE 2011-10-31 19:32:00 -04:00
w1_family.h DS2781 Maxim Stand-Alone Fuel Gauge battery and w1 slave drivers 2012-03-08 11:15:33 -08:00
w1_int.c Merge branch 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux 2011-11-06 19:44:47 -08:00
w1_int.h MAINTAINERS: Evgeniy has moved 2011-08-25 16:25:33 -07:00
w1_io.c w1: disable irqs in critical section 2011-11-02 16:07:03 -07:00
w1_log.h MAINTAINERS: Evgeniy has moved 2011-08-25 16:25:33 -07:00
w1_netlink.c w1: fix w1_send_slave dropping a slave id 2014-05-06 07:51:41 -07:00
w1_netlink.h MAINTAINERS: Evgeniy has moved 2011-08-25 16:25:33 -07:00