From: Bryan O'Donoghue Date: Fri, 15 Jul 2016 17:01:49 +0000 (+0100) Subject: greybus: timesync/pm: Make synchronous call to restore FrameTime X-Git-Tag: v4.13~2185^2~378^2~21^2~162 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=fddd7eafc746e5ad6ea0f980e85a3fdc87091e81;p=mirror_ubuntu-bionic-kernel.git greybus: timesync/pm: Make synchronous call to restore FrameTime When we discussed and agreed a serialized way to-do PM runtime suspend/resume we omitted the necessity to restore the FrameTime on resume. This patch restores the FrameTime synchronously such that when an Interface PM resume callback completes we have either successfully restored the FrameTime including the new Interface or we've produced a result code to indicate what went wrong when trying. Suggested-by: Johan Hovold Signed-off-by: Bryan O'Donoghue Reviewed-by: Johan Hovold Tested-by: David Lin Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/greybus/interface.c b/drivers/staging/greybus/interface.c index 16e268f1b109..b3bd96e43128 100644 --- a/drivers/staging/greybus/interface.c +++ b/drivers/staging/greybus/interface.c @@ -579,6 +579,12 @@ static int gb_interface_resume(struct device *dev) return ret; } + ret = gb_timesync_schedule_synchronous(intf); + if (ret) { + dev_err(dev, "failed to synchronize FrameTime: %d\n", ret); + return ret; + } + return 0; }