linux-imx/drivers/w1
David Fries 25f60b0397 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>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
2014-04-30 16:23:19 +01:00
..
masters MAINTAINERS: Evgeniy has moved 2011-08-25 16:25:33 -07:00
slaves drivers/power/ds2780_battery.c: add a nolock function to w1 interface 2011-11-02 16:07:03 -07:00
Kconfig trivial: Kconfig: .ko is normally not included in module names 2009-06-12 18:01:50 +02:00
Makefile [PATCH] better CONFIG_W1_SLAVE_DS2433_CRC handling 2006-12-07 08:39:43 -08: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 MAINTAINERS: Evgeniy has moved 2011-08-25 16:25:33 -07: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-04-30 16:23:19 +01:00
w1_netlink.h MAINTAINERS: Evgeniy has moved 2011-08-25 16:25:33 -07:00
w1.c w1: fix oops when w1_search is called from netlink connector 2013-03-20 15:03:35 +00:00
w1.h MAINTAINERS: Evgeniy has moved 2011-08-25 16:25:33 -07:00