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>
This commit is contained in:
Sowjanya Komatineni 2020-08-31 17:37:38 +02:00 committed by Mauro Carvalho Chehab
parent 274cf92d5d
commit 0893e4b299

View File

@ -788,6 +788,7 @@ static const struct v4l2_file_operations tegra_channel_fops = {
/* /*
* V4L2 control operations * V4L2 control operations
*/ */
#if IS_ENABLED(CONFIG_VIDEO_TEGRA_TPG)
static int vi_s_ctrl(struct v4l2_ctrl *ctrl) static int vi_s_ctrl(struct v4l2_ctrl *ctrl)
{ {
struct tegra_vi_channel *chan = container_of(ctrl->handler, struct tegra_vi_channel *chan = container_of(ctrl->handler,
@ -814,6 +815,7 @@ static const char *const vi_pattern_strings[] = {
"Black/White Direct Mode", "Black/White Direct Mode",
"Color Patch Mode", "Color Patch Mode",
}; };
#endif
static int tegra_channel_setup_ctrl_handler(struct tegra_vi_channel *chan) static int tegra_channel_setup_ctrl_handler(struct tegra_vi_channel *chan)
{ {