diff options
author | Karthikeyan Ramasubramanian <kramasub@codeaurora.org> | 2016-08-16 17:02:38 -0600 |
---|---|---|
committer | Karthikeyan Ramasubramanian <kramasub@codeaurora.org> | 2016-08-17 13:51:35 -0600 |
commit | ea637de7e471365aa7f4e0eed3816d203fa04dbd (patch) | |
tree | 7fa6b9d1f2bba11300a98596310fca1e2b31c5cc | |
parent | 2e45ea728118fa88ba245a0a755d0a3844d9f54e (diff) |
soc: qcom: glink_spi_xprt: Fix the suspend and resume sequence
If the WDSP component framework does not detect the concerned subsystem,
then the G-Link SPI Transport returns error. This prevents the system
from suspending.
If the concerned subsystem is not found, then let the system to suspend.
CRs-Fixed: 1055800
Change-Id: Id17993dbf28b45308464a7e0d1e5404747fefee1
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
-rw-r--r-- | drivers/soc/qcom/glink_spi_xprt.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/soc/qcom/glink_spi_xprt.c b/drivers/soc/qcom/glink_spi_xprt.c index 6c91ac54821d..66caa6ecaad2 100644 --- a/drivers/soc/qcom/glink_spi_xprt.c +++ b/drivers/soc/qcom/glink_spi_xprt.c @@ -210,11 +210,12 @@ static uint32_t negotiate_features_v1(struct glink_transport_if *if_ptr, */ static int wdsp_suspend(struct glink_cmpnt *cmpnt) { + int rc = 0; + if (cmpnt && cmpnt->master_dev && cmpnt->master_ops && cmpnt->master_ops->suspend) - return cmpnt->master_ops->suspend(cmpnt->master_dev); - else - return -EINVAL; + rc = cmpnt->master_ops->suspend(cmpnt->master_dev); + return rc; } /** @@ -225,11 +226,12 @@ static int wdsp_suspend(struct glink_cmpnt *cmpnt) */ static int wdsp_resume(struct glink_cmpnt *cmpnt) { + int rc = 0; + if (cmpnt && cmpnt->master_dev && cmpnt->master_ops && cmpnt->master_ops->resume) - return cmpnt->master_ops->resume(cmpnt->master_dev); - else - return -EINVAL; + rc = cmpnt->master_ops->resume(cmpnt->master_dev); + return rc; } /** |