lkml.org 
[lkml]   [2015]   [Feb]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] mailbox, pl320-ipc: fixup return type of wait_for_completion_timeout
Date
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 <hofrat@osadl.org>
---

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


\
 
 \ /
  Last update: 2015-02-11 11:41    [W:0.025 / U:2.260 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site