diff options
author | Shobek Sam Attupurath <sattupurath@nvidia.com> | 2013-08-20 20:47:33 +0530 |
---|---|---|
committer | Gabby Lee <galee@nvidia.com> | 2013-09-13 03:20:27 -0700 |
commit | a3cbaaba6faef8abb2b45b5362f70f1ec9dc3136 (patch) | |
tree | 7acebbb7c11249c4acf217c0cf488c45c008c722 | |
parent | 45a40357fc3bcb870a3fd505f690130cf79d3008 (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
Reviewed-by: Rakesh Goyal <rgoyal@nvidia.com>
Reviewed-by: Gabby Lee <galee@nvidia.com>
-rw-r--r-- | drivers/misc/ti-st/st_core.c | 7 |
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..1ce8b4db0c97 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; } |