diff options
author | Seshendra Gadagottu <sgadagottu@nvidia.com> | 2012-02-09 09:33:20 +0530 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2012-03-23 17:24:37 -0700 |
commit | fac3e1e77f7ac6cc6e26d46ec7f78dee24af8358 (patch) | |
tree | 7b93e73afba833dc61d07da3b9d586084f2f2d43 /drivers/usb/class | |
parent | 81186f201da909c05c7373cc27649068e28059c4 (diff) |
arm : tegra : comm: AT command loss WAR
Workaround to avoid make cdc-acm susp_count
to negative.
Bug 935834
Change-Id: I251049537e21662de329f11ecbad0ce15abb1037
Signed-off-by: Seshendra Gadagottu<sgadagottu@nvidia.com>
Reviewed-on: http://git-master/r/84288
(cherry picked from commit d056c04d453bc641e856a61251e7d0aa2dcce73b)
Reviewed-on: http://git-master/r/87505
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>
Rebase-Id: R341dc422938560513a044ffc86a26fe5219ec335
Diffstat (limited to 'drivers/usb/class')
-rw-r--r-- | drivers/usb/class/cdc-acm.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c index b1d1a4e06c92..b602604cc523 100644 --- a/drivers/usb/class/cdc-acm.c +++ b/drivers/usb/class/cdc-acm.c @@ -1440,8 +1440,13 @@ static int acm_resume(struct usb_interface *intf) } spin_lock_irq(&acm->read_lock); - acm->susp_count -= 1; - cnt = acm->susp_count; + if (acm->susp_count > 0) { + acm->susp_count -= 1; + cnt = acm->susp_count; + } else { + spin_unlock_irq(&acm->read_lock); + return 0; + } spin_unlock_irq(&acm->read_lock); if (cnt) |