diff options
| author | Gaurav Kohli <gkohli@codeaurora.org> | 2017-02-22 18:34:12 +0530 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2017-02-26 22:05:02 -0800 |
| commit | e82113ca001cd3800512e6583f13076fa7b648b2 (patch) | |
| tree | 0e05dba6e7df2071d8bb02fa1247410965b5aca4 | |
| parent | 49d57d9b26e1a73dfe6e6ec5dfc3725908483696 (diff) | |
soc: qcom: Notify clients in case qmi connection to service locator fails
Clients are not getting notification if qmi connection to locator has
not been established. As a result of this clients are waiting forever.
So to avoid this notifying the client in case of qmi connection fails
to service locator.
Change-Id: Id1625c18db812831860355e987a97789357dda13
Signed-off-by: Gaurav Kohli <gkohli@codeaurora.org>
| -rw-r--r-- | drivers/soc/qcom/service-locator.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/soc/qcom/service-locator.c b/drivers/soc/qcom/service-locator.c index 2b708732760f..8581ed587ead 100644 --- a/drivers/soc/qcom/service-locator.c +++ b/drivers/soc/qcom/service-locator.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2016, The Linux Foundation. All rights reserved. + * Copyright (c) 2015-2017, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -111,6 +111,7 @@ static void service_locator_svc_arrive(struct work_struct *work) qmi_handle_create(service_locator_clnt_notify, NULL); if (!service_locator.clnt_handle) { service_locator.clnt_handle = NULL; + complete_all(&service_locator.service_available); mutex_unlock(&service_locator.service_mutex); pr_err("Service locator QMI client handle alloc failed!\n"); return; @@ -123,6 +124,7 @@ static void service_locator_svc_arrive(struct work_struct *work) if (rc) { qmi_handle_destroy(service_locator.clnt_handle); service_locator.clnt_handle = NULL; + complete_all(&service_locator.service_available); mutex_unlock(&service_locator.service_mutex); pr_err("Unable to connnect to service rc:%d\n", rc); return; @@ -138,6 +140,7 @@ static void service_locator_svc_exit(struct work_struct *work) mutex_lock(&service_locator.service_mutex); qmi_handle_destroy(service_locator.clnt_handle); service_locator.clnt_handle = NULL; + complete_all(&service_locator.service_available); mutex_unlock(&service_locator.service_mutex); pr_info("Connection with service locator lost\n"); } |
