media: tegra: nvavp: avoid racing in nvavp_uninit
nvavp_init() might be called when open_lock is dropped in nvavp_uninit(),
which will mess up the _init/_uninit sequence. To eliminate the racing,
removes the unnecessary cancel_work_sync() and also the _unlock/_lock
around it. It is safe to do so since nvavp_uninit() sets nvavp->pending
to false in nvavp_halt_vde(), and the work handler will do nothing if
nvavp->pending is false.
Bug
200013513
Change-Id: If0a84545815c61388ba351e6cd1cc78bd99f809e
Signed-off-by: Allen Yu <alleny@nvidia.com>
Reviewed-on: http://git-master/r/482340
(cherry picked from commit
f9abd9e6de2092b0b98dbc1f01b17e4d49b61457)
Reviewed-on: http://git-master/r/542553
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>
Tested-by: Dhiren Parmar <dparmar@nvidia.com>