From 170bd5330383ce62127ef5b6eeeab9afebd7b838 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Sat, 13 Apr 2013 05:19:41 -0300 Subject: [PATCH] [media] cx25821: fix compiler warning MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit drivers/media/pci/cx25821/cx25821-video.c: In function ‘cx25821_video_register’: drivers/media/pci/cx25821/cx25821-video.c:518:1: warning: the frame size of 1600 bytes is larger than 1024 bytes [-Wframe-larger-than=] Fixed by just making the struct video_device template static const. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- drivers/media/pci/cx25821/cx25821-video.c | 9 ++++----- drivers/media/pci/cx25821/cx25821.h | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/media/pci/cx25821/cx25821-video.c b/drivers/media/pci/cx25821/cx25821-video.c index 8bf9c890883b..4eaa67a0833b 100644 --- a/drivers/media/pci/cx25821/cx25821-video.c +++ b/drivers/media/pci/cx25821/cx25821-video.c @@ -161,7 +161,7 @@ int cx25821_set_tvnorm(struct cx25821_dev *dev, v4l2_std_id norm) struct video_device *cx25821_vdev_init(struct cx25821_dev *dev, struct pci_dev *pci, - struct video_device *template, + const struct video_device *template, char *type) { struct video_device *vfd; @@ -447,10 +447,7 @@ void cx25821_video_unregister(struct cx25821_dev *dev, int chan_num) int cx25821_video_register(struct cx25821_dev *dev) { - int err; - int i; - - struct video_device cx25821_video_device = { + static const struct video_device cx25821_video_device = { .name = "cx25821-video", .fops = &video_fops, .minor = -1, @@ -458,6 +455,8 @@ int cx25821_video_register(struct cx25821_dev *dev) .tvnorms = CX25821_NORMS, .current_norm = V4L2_STD_NTSC_M, }; + int err; + int i; spin_lock_init(&dev->slock); diff --git a/drivers/media/pci/cx25821/cx25821.h b/drivers/media/pci/cx25821/cx25821.h index 8a9c0c869412..85693cdf0ee1 100644 --- a/drivers/media/pci/cx25821/cx25821.h +++ b/drivers/media/pci/cx25821/cx25821.h @@ -610,6 +610,6 @@ extern void cx25821_set_pixel_format(struct cx25821_dev *dev, int channel, extern void cx25821_videoioctl_unregister(struct cx25821_dev *dev); extern struct video_device *cx25821_vdev_init(struct cx25821_dev *dev, struct pci_dev *pci, - struct video_device *template, + const struct video_device *template, char *type); #endif -- 2.30.2