Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

media: tegra-video: Fix compilation warning of unused variable

vi_pattern_strings is used only when CONFIG_VIDEO_TEGRA_TPG is
enabled and V4L2 control operations currently are used only in
TPG mode.

So when tegra-video is build for non TPG, warnings of unused
variable is reported for v4l2 control operation variable.

This patch fixes it.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Sowjanya Komatineni <skomatineni@nvidia.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

authored by

Sowjanya Komatineni and committed by
Mauro Carvalho Chehab
0893e4b2 274cf92d

+2
+2
drivers/staging/media/tegra-video/vi.c
··· 788 788 /* 789 789 * V4L2 control operations 790 790 */ 791 + #if IS_ENABLED(CONFIG_VIDEO_TEGRA_TPG) 791 792 static int vi_s_ctrl(struct v4l2_ctrl *ctrl) 792 793 { 793 794 struct tegra_vi_channel *chan = container_of(ctrl->handler, ··· 815 814 "Black/White Direct Mode", 816 815 "Color Patch Mode", 817 816 }; 817 + #endif 818 818 819 819 static int tegra_channel_setup_ctrl_handler(struct tegra_vi_channel *chan) 820 820 {