Skip to content

Commit 43ba464

Browse files
Boris BREZILLONmchehab
authored andcommitted
[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>
1 parent f5fe58f commit 43ba464

7 files changed

Lines changed: 8 additions & 8 deletions

File tree

‎drivers/media/pci/cx18/cx18-av-core.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -952,7 +952,7 @@ static int cx18_av_s_mbus_fmt(struct v4l2_subdev *sd, struct v4l2_mbus_framefmt
952952
int HSC, VSC, Vsrc, Hsrc, filter, Vlines;
953953
int is_50Hz = !(state->std & V4L2_STD_525_60);
954954

955-
if (fmt->code != V4L2_MBUS_FMT_FIXED)
955+
if (fmt->code != MEDIA_BUS_FMT_FIXED)
956956
return -EINVAL;
957957

958958
fmt->field = V4L2_FIELD_INTERLACED;

‎drivers/media/pci/cx18/cx18-controls.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ static int cx18_s_video_encoding(struct cx2341x_handler *cxhdl, u32 val)
9898
/* fix videodecoder resolution */
9999
fmt.width = cxhdl->width / (is_mpeg1 ? 2 : 1);
100100
fmt.height = cxhdl->height;
101-
fmt.code = V4L2_MBUS_FMT_FIXED;
101+
fmt.code = MEDIA_BUS_FMT_FIXED;
102102
v4l2_subdev_call(cx->sd_av, video, s_mbus_fmt, &fmt);
103103
return 0;
104104
}

‎drivers/media/pci/cx18/cx18-ioctl.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ static int cx18_s_fmt_vid_cap(struct file *file, void *fh,
294294

295295
mbus_fmt.width = cx->cxhdl.width = w;
296296
mbus_fmt.height = cx->cxhdl.height = h;
297-
mbus_fmt.code = V4L2_MBUS_FMT_FIXED;
297+
mbus_fmt.code = MEDIA_BUS_FMT_FIXED;
298298
v4l2_subdev_call(cx->sd_av, video, s_mbus_fmt, &mbus_fmt);
299299
return cx18_g_fmt_vid_cap(file, fh, fmt);
300300
}

‎drivers/media/pci/cx23885/cx23885-video.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -608,7 +608,7 @@ static int vidioc_s_fmt_vid_cap(struct file *file, void *priv,
608608
dev->field = f->fmt.pix.field;
609609
dprintk(2, "%s() width=%d height=%d field=%d\n", __func__,
610610
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);
612612
call_all(dev, video, s_mbus_fmt, &mbus_fmt);
613613
v4l2_fill_pix_format(&f->fmt.pix, &mbus_fmt);
614614
/* s_mbus_fmt overwrites f->fmt.pix.field, restore it */

‎drivers/media/pci/ivtv/ivtv-controls.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ static int ivtv_s_video_encoding(struct cx2341x_handler *cxhdl, u32 val)
6969
/* fix videodecoder resolution */
7070
fmt.width = cxhdl->width / (is_mpeg1 ? 2 : 1);
7171
fmt.height = cxhdl->height;
72-
fmt.code = V4L2_MBUS_FMT_FIXED;
72+
fmt.code = MEDIA_BUS_FMT_FIXED;
7373
v4l2_subdev_call(itv->sd_video, video, s_mbus_fmt, &fmt);
7474
return 0;
7575
}

‎drivers/media/pci/ivtv/ivtv-ioctl.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,7 @@ static int ivtv_s_fmt_vid_cap(struct file *file, void *fh, struct v4l2_format *f
595595
fmt->fmt.pix.width /= 2;
596596
mbus_fmt.width = fmt->fmt.pix.width;
597597
mbus_fmt.height = h;
598-
mbus_fmt.code = V4L2_MBUS_FMT_FIXED;
598+
mbus_fmt.code = MEDIA_BUS_FMT_FIXED;
599599
v4l2_subdev_call(itv->sd_video, video, s_mbus_fmt, &mbus_fmt);
600600
return ivtv_g_fmt_vid_cap(file, fh, fmt);
601601
}

‎drivers/media/pci/saa7134/saa7134-empress.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ static int empress_s_fmt_vid_cap(struct file *file, void *priv,
140140
struct saa7134_dev *dev = video_drvdata(file);
141141
struct v4l2_mbus_framefmt mbus_fmt;
142142

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);
144144
saa_call_all(dev, video, s_mbus_fmt, &mbus_fmt);
145145
v4l2_fill_pix_format(&f->fmt.pix, &mbus_fmt);
146146

@@ -157,7 +157,7 @@ static int empress_try_fmt_vid_cap(struct file *file, void *priv,
157157
struct saa7134_dev *dev = video_drvdata(file);
158158
struct v4l2_mbus_framefmt mbus_fmt;
159159

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);
161161
saa_call_all(dev, video, try_mbus_fmt, &mbus_fmt);
162162
v4l2_fill_pix_format(&f->fmt.pix, &mbus_fmt);
163163

0 commit comments

Comments
 (0)