video: host: vi: only do host1x_writel for vi.0
During module removing, vi.0 device will release the whole resources
and set aperture[0] to NULL. Then vi.1 device will try to call
host1x_writel(), which will access the master device vi.0's aperture.
This will cause kernel oops with NULL pointer access.
This patch will check the device id, only do the host1x_writel()
operation for vi.0.
Bug
1421146
Change-Id: I182b59063460900a3c747a9b4c7a93845a43d8ae
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/347133
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jihoon Bang <jbang@nvidia.com>
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>