mailbox: Fix TX completion init
authorLeyFoon Tan <lftan.linux@gmail.com>
Tue, 18 Mar 2014 18:46:16 +0000 (00:16 +0530)
committerLiviu Dudau <Liviu.Dudau@arm.com>
Mon, 12 May 2014 12:27:39 +0000 (13:27 +0100)
commitf5c3a185c08e89f7ed68d14ec2558f0d5ddb0da1
tree10c53e0bc2d010fbb7e2a17eecbc79daeb3fb605
parent6a2fdab0d6dd0ad78e602ff14d1e7af38173ebe1
mailbox: Fix TX completion init

For fast TX the complete could be called before being initialized as follows
 mbox_send_message --> poll_txdone --> tx_tick --> complete(&chan->tx_complete)

Init the completion early enough to fix the race.

Signed-off-by: LeyFoon Tan <lftan.linux@gmail.com>
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
drivers/mailbox/mailbox.c