From: Volker Ernst Date: Wed, 13 Oct 2010 09:03:57 +0000 (+0200) Subject: serial/imx: check that the buffer is non-empty before sending it out X-Git-Tag: v2.6.37-rc1~155^2~3 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4e4e66029af090c98cb10fafd13e8dd5039037a9;p=pandora-kernel.git serial/imx: check that the buffer is non-empty before sending it out The .start_tx callback (imx_start_tx here) isn't only called when the buffer is non-empty. E.g. after resume or when handshaking is enabled and the other side starts to signal being ready. So check for an empty puffer already before sending the first character. This prevents sending out stale (or uninitialised) data. Signed-off-by: Volker Ernst Signed-off-by: Daniel Mack Cc: Andy Green [ukl: reword commit log, put check in while condition] Signed-off-by: Uwe Kleine-König Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed