]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commit
media: video: tegra: ar0832: rectify locking sequence
authorSang-Hun Lee <sanlee@nvidia.com>
Thu, 30 Aug 2012 01:09:25 +0000 (18:09 -0700)
committerDan Willemsen <dwillemsen@nvidia.com>
Sat, 14 Sep 2013 08:04:44 +0000 (01:04 -0700)
commit69213ac853a1fab0c7c3190d3d2f260f37bbf0bc
tree5fe8fd1dc853d3a8a4c125a61e1f32c90f89d86e
parentda8050dc18d25408c6f2fa54678483cfad320a22
media: video: tegra: ar0832: rectify locking sequence

Problem description:
 - ar0832_set_alternate_addr writes to registers thus should be
   protected by a lock
 - ar0832_power_on will not release the mutex lock in an error case

Fix description:
 - Do not unlock ar0832_camera_lock until ar0832_set_alternate_addr is
   done
 - Release ar0832_camera_lock in a regulator error case as well

Bug 1039067

Reviewed-on: http://git-master/r/130407
(cherry picked from commit 8be77fd1a61a1c93c04f1f141f1df91d24b5e54d)

Change-Id: Ic93a0a729a7df4ae704658a1774f7f5dfbb438bd
Signed-off-by: Sang-Hun Lee <sanlee@nvidia.com>
Reviewed-on: http://git-master/r/133398
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Thomas Cherry <tcherry@nvidia.com>
Rebase-Id: R5294f69c4273a4f90e075509c45182273a383675
drivers/media/video/tegra/ar0832_main.c