2015-02-11 10:29:52

by Nicholas Mc Guire

[permalink] [raw]
Subject: [PATCH] mailbox, pl320-ipc: fixup return type of wait_for_completion_timeout

return type of wait_for_completion_timeout is unsigned long not int. A
appropriately named variable of type unsigned long is added and the
assignments fixed up.

Signed-off-by: Nicholas Mc Guire <[email protected]>
---

Patch was only compile tested with u300_defconfig + CONFIG_MAILBOX=y
CONFIG_PL320_MBOX=y

Patch is against 3.19.0 (localversion-next is -next-20150211)

drivers/mailbox/pl320-ipc.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/mailbox/pl320-ipc.c b/drivers/mailbox/pl320-ipc.c
index f3755e0..b898264 100644
--- a/drivers/mailbox/pl320-ipc.c
+++ b/drivers/mailbox/pl320-ipc.c
@@ -88,14 +88,15 @@ static u32 __ipc_rcv(int mbox, u32 *data)
int pl320_ipc_transmit(u32 *data)
{
int ret;
+ unsigned long time_left;

mutex_lock(&ipc_m1_lock);

init_completion(&ipc_completion);
__ipc_send(IPC_TX_MBOX, data);
- ret = wait_for_completion_timeout(&ipc_completion,
+ time_left = wait_for_completion_timeout(&ipc_completion,
msecs_to_jiffies(1000));
- if (ret == 0) {
+ if (time_left == 0) {
ret = -ETIMEDOUT;
goto out;
}
--
1.7.10.4