Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[media] pci: Make use of MEDIA_BUS_FMT definitions

In order to have subsytem agnostic media bus format definitions we've
moved media bus definition to include/uapi/linux/media-bus-format.h and
prefixed values with MEDIA_BUS_FMT instead of V4L2_MBUS_FMT.

Replace all references to the old definitions in pci drivers.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>

authored by

Boris BREZILLON and committed by
Mauro Carvalho Chehab
43ba4641 f5fe58fd

+8 -8
+1 -1
drivers/media/pci/cx18/cx18-av-core.c
··· 952 952 int HSC, VSC, Vsrc, Hsrc, filter, Vlines; 953 953 int is_50Hz = !(state->std & V4L2_STD_525_60); 954 954 955 - if (fmt->code != V4L2_MBUS_FMT_FIXED) 955 + if (fmt->code != MEDIA_BUS_FMT_FIXED) 956 956 return -EINVAL; 957 957 958 958 fmt->field = V4L2_FIELD_INTERLACED;
+1 -1
drivers/media/pci/cx18/cx18-controls.c
··· 98 98 /* fix videodecoder resolution */ 99 99 fmt.width = cxhdl->width / (is_mpeg1 ? 2 : 1); 100 100 fmt.height = cxhdl->height; 101 - fmt.code = V4L2_MBUS_FMT_FIXED; 101 + fmt.code = MEDIA_BUS_FMT_FIXED; 102 102 v4l2_subdev_call(cx->sd_av, video, s_mbus_fmt, &fmt); 103 103 return 0; 104 104 }
+1 -1
drivers/media/pci/cx18/cx18-ioctl.c
··· 294 294 295 295 mbus_fmt.width = cx->cxhdl.width = w; 296 296 mbus_fmt.height = cx->cxhdl.height = h; 297 - mbus_fmt.code = V4L2_MBUS_FMT_FIXED; 297 + mbus_fmt.code = MEDIA_BUS_FMT_FIXED; 298 298 v4l2_subdev_call(cx->sd_av, video, s_mbus_fmt, &mbus_fmt); 299 299 return cx18_g_fmt_vid_cap(file, fh, fmt); 300 300 }
+1 -1
drivers/media/pci/cx23885/cx23885-video.c
··· 608 608 dev->field = f->fmt.pix.field; 609 609 dprintk(2, "%s() width=%d height=%d field=%d\n", __func__, 610 610 dev->width, dev->height, dev->field); 611 - v4l2_fill_mbus_format(&mbus_fmt, &f->fmt.pix, V4L2_MBUS_FMT_FIXED); 611 + v4l2_fill_mbus_format(&mbus_fmt, &f->fmt.pix, MEDIA_BUS_FMT_FIXED); 612 612 call_all(dev, video, s_mbus_fmt, &mbus_fmt); 613 613 v4l2_fill_pix_format(&f->fmt.pix, &mbus_fmt); 614 614 /* s_mbus_fmt overwrites f->fmt.pix.field, restore it */
+1 -1
drivers/media/pci/ivtv/ivtv-controls.c
··· 69 69 /* fix videodecoder resolution */ 70 70 fmt.width = cxhdl->width / (is_mpeg1 ? 2 : 1); 71 71 fmt.height = cxhdl->height; 72 - fmt.code = V4L2_MBUS_FMT_FIXED; 72 + fmt.code = MEDIA_BUS_FMT_FIXED; 73 73 v4l2_subdev_call(itv->sd_video, video, s_mbus_fmt, &fmt); 74 74 return 0; 75 75 }
+1 -1
drivers/media/pci/ivtv/ivtv-ioctl.c
··· 595 595 fmt->fmt.pix.width /= 2; 596 596 mbus_fmt.width = fmt->fmt.pix.width; 597 597 mbus_fmt.height = h; 598 - mbus_fmt.code = V4L2_MBUS_FMT_FIXED; 598 + mbus_fmt.code = MEDIA_BUS_FMT_FIXED; 599 599 v4l2_subdev_call(itv->sd_video, video, s_mbus_fmt, &mbus_fmt); 600 600 return ivtv_g_fmt_vid_cap(file, fh, fmt); 601 601 }
+2 -2
drivers/media/pci/saa7134/saa7134-empress.c
··· 140 140 struct saa7134_dev *dev = video_drvdata(file); 141 141 struct v4l2_mbus_framefmt mbus_fmt; 142 142 143 - v4l2_fill_mbus_format(&mbus_fmt, &f->fmt.pix, V4L2_MBUS_FMT_FIXED); 143 + v4l2_fill_mbus_format(&mbus_fmt, &f->fmt.pix, MEDIA_BUS_FMT_FIXED); 144 144 saa_call_all(dev, video, s_mbus_fmt, &mbus_fmt); 145 145 v4l2_fill_pix_format(&f->fmt.pix, &mbus_fmt); 146 146 ··· 157 157 struct saa7134_dev *dev = video_drvdata(file); 158 158 struct v4l2_mbus_framefmt mbus_fmt; 159 159 160 - v4l2_fill_mbus_format(&mbus_fmt, &f->fmt.pix, V4L2_MBUS_FMT_FIXED); 160 + v4l2_fill_mbus_format(&mbus_fmt, &f->fmt.pix, MEDIA_BUS_FMT_FIXED); 161 161 saa_call_all(dev, video, try_mbus_fmt, &mbus_fmt); 162 162 v4l2_fill_pix_format(&f->fmt.pix, &mbus_fmt); 163 163