media: cobalt: drop static for sd_fmt
authorHans Verkuil <hverkuil-cisco@xs4all.nl>
Wed, 7 Apr 2021 14:11:57 +0000 (16:11 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Fri, 9 Apr 2021 10:58:52 +0000 (12:58 +0200)
The struct v4l2_subdev_format sd_fmt cannot be static since it can be
written back by the subdev. Just have it on the stack.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/pci/cobalt/cobalt-driver.c

index 9c754e0..839503e 100644 (file)
@@ -572,7 +572,7 @@ static int cobalt_subdevs_hsma_init(struct cobalt *cobalt)
                .addr = 0x20,
                .platform_data = &adv7842_pdata,
        };
-       static struct v4l2_subdev_format sd_fmt = {
+       struct v4l2_subdev_format sd_fmt = {
                .pad = ADV7842_PAD_SOURCE,
                .which = V4L2_SUBDEV_FORMAT_ACTIVE,
                .format.code = MEDIA_BUS_FMT_YUYV8_1X16,