From: Sowjanya Komatineni Date: Mon, 31 Aug 2020 15:37:38 +0000 (+0200) Subject: media: tegra-video: Fix compilation warning of unused variable X-Git-Tag: v5.15~2723^2~165 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0893e4b2998a5d8d0c281909508fd4e6d1273d6c;p=platform%2Fkernel%2Flinux-starfive.git 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 Signed-off-by: Sowjanya Komatineni Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/staging/media/tegra-video/vi.c b/drivers/staging/media/tegra-video/vi.c index 5dd4a03..560d8b3 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) {