summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShobek Sam Attupurath <sattupurath@nvidia.com>2013-08-20 20:47:33 +0530
committerHarry Hong <hhong@nvidia.com>2013-10-31 03:04:55 -0700
commit33146a743ac1ded4d684aabd0f8372796f32cd63 (patch)
tree97f16ee405e8d71b372af8c87fef5a61875296dd
parent208dbff6018a1d1a63d2417592ee9b3f5472d733 (diff)
misc: ti-st: Send timeout error if ST registration fails
Send timeout error in case of ST registration failure so that that ST retries. Bug 1347583 Change-Id: Ie64d17203aa03e7efa126d243c01e9017008a7f3 Signed-off-by: Shobek Sam Attupurath <sattupurath@nvidia.com> Reviewed-on: http://git-master/r/263940 (cherry picked from commit a3cbaaba6faef8abb2b45b5362f70f1ec9dc3136) Reviewed-on: http://git-master/r/304677 Reviewed-by: Harry Hong <hhong@nvidia.com> Tested-by: Harry Hong <hhong@nvidia.com>
-rw-r--r--drivers/misc/ti-st/st_core.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/misc/ti-st/st_core.c b/drivers/misc/ti-st/st_core.c
index 8d706bb277c1..16ed01638520 100644
--- a/drivers/misc/ti-st/st_core.c
+++ b/drivers/misc/ti-st/st_core.c
@@ -766,8 +766,13 @@ static void st_tty_close(struct tty_struct *tty)
*/
spin_lock_irqsave(&st_gdata->lock, flags);
for (i = ST_BT; i < ST_MAX_CHANNELS; i++) {
- if (st_gdata->is_registered[i] == true)
+ if (st_gdata->is_registered[i] == true) {
pr_err("%d not un-registered", i);
+
+ if (!test_bit(ST_REG_PENDING, &st_gdata->st_state)) {
+ st_reg_complete(st_gdata, -ETIMEDOUT);
+ }
+ }
st_gdata->list[i] = NULL;
st_gdata->is_registered[i] = false;
}