aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2013-04-13 04:19:41 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-04-16 15:28:26 -0400
commit170bd5330383ce62127ef5b6eeeab9afebd7b838 (patch)
tree7458eb64e4ccf2b134bb176affb320875300222a /drivers/media
parent31b320739b4318a04c203918310b49a55a598bde (diff)
[media] cx25821: fix compiler warning
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 <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/pci/cx25821/cx25821-video.c9
-rw-r--r--drivers/media/pci/cx25821/cx25821.h2
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)
161 161
162struct video_device *cx25821_vdev_init(struct cx25821_dev *dev, 162struct video_device *cx25821_vdev_init(struct cx25821_dev *dev,
163 struct pci_dev *pci, 163 struct pci_dev *pci,
164 struct video_device *template, 164 const struct video_device *template,
165 char *type) 165 char *type)
166{ 166{
167 struct video_device *vfd; 167 struct video_device *vfd;
@@ -447,10 +447,7 @@ void cx25821_video_unregister(struct cx25821_dev *dev, int chan_num)
447 447
448int cx25821_video_register(struct cx25821_dev *dev) 448int cx25821_video_register(struct cx25821_dev *dev)
449{ 449{
450 int err; 450 static const struct video_device cx25821_video_device = {
451 int i;
452
453 struct video_device cx25821_video_device = {
454 .name = "cx25821-video", 451 .name = "cx25821-video",
455 .fops = &video_fops, 452 .fops = &video_fops,
456 .minor = -1, 453 .minor = -1,
@@ -458,6 +455,8 @@ int cx25821_video_register(struct cx25821_dev *dev)
458 .tvnorms = CX25821_NORMS, 455 .tvnorms = CX25821_NORMS,
459 .current_norm = V4L2_STD_NTSC_M, 456 .current_norm = V4L2_STD_NTSC_M,
460 }; 457 };
458 int err;
459 int i;
461 460
462 spin_lock_init(&dev->slock); 461 spin_lock_init(&dev->slock);
463 462
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,
610extern void cx25821_videoioctl_unregister(struct cx25821_dev *dev); 610extern void cx25821_videoioctl_unregister(struct cx25821_dev *dev);
611extern struct video_device *cx25821_vdev_init(struct cx25821_dev *dev, 611extern struct video_device *cx25821_vdev_init(struct cx25821_dev *dev,
612 struct pci_dev *pci, 612 struct pci_dev *pci,
613 struct video_device *template, 613 const struct video_device *template,
614 char *type); 614 char *type);
615#endif 615#endif