summaryrefslogtreecommitdiffstats
path: root/drivers/staging/media/tegra-video
diff options
context:
space:
mode:
authorSowjanya Komatineni <skomatineni@nvidia.com>2020-08-31 17:37:38 +0200
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2020-09-26 10:24:29 +0200
commit0893e4b2998a5d8d0c281909508fd4e6d1273d6c (patch)
treee674a96c4c00c311a29d6acd169f63ed41909278 /drivers/staging/media/tegra-video
parent274cf92d5dff5c2fec1a518078542ffe70d07646 (diff)
downloadlinux-0893e4b2998a5d8d0c281909508fd4e6d1273d6c.tar.bz2
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>
Diffstat (limited to 'drivers/staging/media/tegra-video')
-rw-r--r--drivers/staging/media/tegra-video/vi.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/staging/media/tegra-video/vi.c b/drivers/staging/media/tegra-video/vi.c
index 5dd4a03c2b20..560d8b368124 100644
--- a/drivers/staging/media/tegra-video/vi.c
+++ b/drivers/staging/media/tegra-video/vi.c
@@ -788,6 +788,7 @@ static const struct v4l2_file_operations tegra_channel_fops = {
/*
* V4L2 control operations
*/
+#if IS_ENABLED(CONFIG_VIDEO_TEGRA_TPG)
static int vi_s_ctrl(struct v4l2_ctrl *ctrl)
{
struct tegra_vi_channel *chan = container_of(ctrl->handler,
@@ -814,6 +815,7 @@ static const char *const vi_pattern_strings[] = {
"Black/White Direct Mode",
"Color Patch Mode",
};
+#endif
static int tegra_channel_setup_ctrl_handler(struct tegra_vi_channel *chan)
{