mailbox: Don't unnecessarily re-arm the polling timer
authorAndrew Bresticker <abrestic@chromium.org>
Thu, 30 Oct 2014 20:01:07 +0000 (13:01 -0700)
committerJassi Brar <jaswinder.singh@linaro.org>
Thu, 27 Nov 2014 06:51:27 +0000 (12:21 +0530)
poll_txdone() will unconditionally re-arm the polling timer if there was
an active request, even if the active request completed and no other
requests were submitted.  This is fixed by:
 - only re-arming the timer if the controller reported that the current
   transmission has not completed, and,
 - moving the call to poll_txdone() into msg_submit() so that the
   controller gets polled (and the timer re-armed, if necessary) whenever
   a new message is submitted.

Signed-off-by: Andrew Bresticker <abrestic@chromium.org>
Reviewed-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
drivers/mailbox/mailbox.c

Simple merge