misc: cec: defer suspend if init is in progress
authorDeepak Nibade <dnibade@nvidia.com>
Tue, 24 Sep 2013 10:13:11 +0000 (15:13 +0530)
committerMrutyunjay Sawant <msawant@nvidia.com>
Thu, 26 Sep 2013 10:06:01 +0000 (03:06 -0700)
commitcaf3b200ac859c81c8631c916e6b397093b134db
treede0e44a67d53e0dbcc6f74af679eefb3e8a14b96
parentd8fa40ca008ac12125d3251a81276bfacd6f8b43
misc: cec: defer suspend if init is in progress

- there is below race condition in cec driver :
  -tegra_cec_init() is in progress which is setting many registers
  -suspend is called at the same time
  -tegra_cec_suspend() disables clock before tegra_cec_init() completes
- above race condition hangs the system with trying to write cec
  register while clock is off
- fix this race condition by deferring suspend if init is still in
  progress

Bug 1360341

Change-Id: I0450db565e864f289d1ce5af13b43ee8ad4f0ee6
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/278381
(cherry picked from commit 58effacbdd01c2b6e71023cae828b2eaddbbb4bf)
Reviewed-on: http://git-master/r/278324
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
drivers/misc/tegra-cec/tegra_cec.c