media: mtk-vcodec: fix argument used when DEBUG is defined
authorTom Rix <trix@redhat.com>
Sun, 17 Jan 2021 22:21:38 +0000 (23:21 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 4 Mar 2021 10:37:43 +0000 (11:37 +0100)
commit2c0a480ac5959557d45f5dcd0290bc2faf4e2fdb
tree195351e10489fbf9835c98e8fbba0e30c49dce94
parentf1e2ca0c11e48200eb9474e65ab4d1956a821c70
media: mtk-vcodec: fix argument used when DEBUG is defined

[ Upstream commit a04e187d231086a1313fd635ac42bdbc997137ad ]

When DEBUG is defined this error occurs

drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c:306:41:
  error: ā€˜iā€™ undeclared (first use in this function)
  mtk_v4l2_debug(2, "reg[%d] base=0x%p", i, dev->reg_base[VENC_SYS]);

Reviewing the old line

mtk_v4l2_debug(2, "reg[%d] base=0x%p", i, dev->reg_base[i]);

All the i's need to be changed to VENC_SYS.
Fix a similar error for VENC_LT_SYS.

Fixes: 0dc4b3286125 ("media: mtk-vcodec: venc: support SCP firmware")
Signed-off-by: Tom Rix <trix@redhat.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c