From 52764bd8aac77dd8ddbdaf55ae896a55ab2a9f5e Mon Sep 17 00:00:00 2001 From: Bryan O'Donoghue Date: Tue, 19 Jul 2016 01:56:49 +0100 Subject: [PATCH] greybus: timesync: Bugfix ping should not result in -EAGAIN gb_timesync_schedule_synchronous() is currently making a synchronous FrameTime synchronization happen. It does a wait_event_interruptible() and then goes to check the status of the state-machine. Occasionally the state indicates PING - which is a completely valid state and should result in a result code of 0 not -EAGAIN. This patch fixes by making __gb_timesync_get_status() return 0 instead of -EAGAIN for the PING state. Signed-off-by: Bryan O'Donoghue Tested-by: David Lin Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman --- drivers/staging/greybus/timesync.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/greybus/timesync.c b/drivers/staging/greybus/timesync.c index 14531edb824c..ddbdf2beb48d 100644 --- a/drivers/staging/greybus/timesync.c +++ b/drivers/staging/greybus/timesync.c @@ -462,9 +462,9 @@ static int __gb_timesync_get_status(struct gb_timesync_svc *timesync_svc) case GB_TIMESYNC_STATE_INIT: case GB_TIMESYNC_STATE_WAIT_SVC: case GB_TIMESYNC_STATE_AUTHORITATIVE: - case GB_TIMESYNC_STATE_PING: ret = -EAGAIN; break; + case GB_TIMESYNC_STATE_PING: case GB_TIMESYNC_STATE_ACTIVE: ret = 0; break; -- 2.39.5