[media] pci: Make use of MEDIA_BUS_FMT definitions
authorBoris BREZILLON <boris.brezillon@free-electrons.com>
Mon, 10 Nov 2014 17:28:30 +0000 (14:28 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Fri, 14 Nov 2014 19:53:21 +0000 (17:53 -0200)
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>
drivers/media/pci/cx18/cx18-av-core.c
drivers/media/pci/cx18/cx18-controls.c
drivers/media/pci/cx18/cx18-ioctl.c
drivers/media/pci/cx23885/cx23885-video.c
drivers/media/pci/ivtv/ivtv-controls.c
drivers/media/pci/ivtv/ivtv-ioctl.c
drivers/media/pci/saa7134/saa7134-empress.c

index 45be26cdb6536487aaf30c523474bebe213ec18a..5a55630d09dba7cfdc737829437d31513a385e1b 100644 (file)
@@ -952,7 +952,7 @@ static int cx18_av_s_mbus_fmt(struct v4l2_subdev *sd, struct v4l2_mbus_framefmt
        int HSC, VSC, Vsrc, Hsrc, filter, Vlines;
        int is_50Hz = !(state->std & V4L2_STD_525_60);
 
-       if (fmt->code != V4L2_MBUS_FMT_FIXED)
+       if (fmt->code != MEDIA_BUS_FMT_FIXED)
                return -EINVAL;
 
        fmt->field = V4L2_FIELD_INTERLACED;
index 282a3d29fdaa2a20bd677328f53b35bce61f4b7d..4aeb7c6b8ce1a75d7aac5e112f7856b7d3b946ef 100644 (file)
@@ -98,7 +98,7 @@ static int cx18_s_video_encoding(struct cx2341x_handler *cxhdl, u32 val)
        /* fix videodecoder resolution */
        fmt.width = cxhdl->width / (is_mpeg1 ? 2 : 1);
        fmt.height = cxhdl->height;
-       fmt.code = V4L2_MBUS_FMT_FIXED;
+       fmt.code = MEDIA_BUS_FMT_FIXED;
        v4l2_subdev_call(cx->sd_av, video, s_mbus_fmt, &fmt);
        return 0;
 }
index 6f2b59042b7383ed8dbcbc415bd0dadf8f23e232..71963db3d92b5d60941b9d9f46545777e677cbf4 100644 (file)
@@ -294,7 +294,7 @@ static int cx18_s_fmt_vid_cap(struct file *file, void *fh,
 
        mbus_fmt.width = cx->cxhdl.width = w;
        mbus_fmt.height = cx->cxhdl.height = h;
-       mbus_fmt.code = V4L2_MBUS_FMT_FIXED;
+       mbus_fmt.code = MEDIA_BUS_FMT_FIXED;
        v4l2_subdev_call(cx->sd_av, video, s_mbus_fmt, &mbus_fmt);
        return cx18_g_fmt_vid_cap(file, fh, fmt);
 }
index 682a4f95df6bd09f062d0c58e7ac3185b158db6f..091f5dbe65a88792c184404b7eaf4f0d93f3f797 100644 (file)
@@ -608,7 +608,7 @@ static int vidioc_s_fmt_vid_cap(struct file *file, void *priv,
        dev->field      = f->fmt.pix.field;
        dprintk(2, "%s() width=%d height=%d field=%d\n", __func__,
                dev->width, dev->height, dev->field);
-       v4l2_fill_mbus_format(&mbus_fmt, &f->fmt.pix, V4L2_MBUS_FMT_FIXED);
+       v4l2_fill_mbus_format(&mbus_fmt, &f->fmt.pix, MEDIA_BUS_FMT_FIXED);
        call_all(dev, video, s_mbus_fmt, &mbus_fmt);
        v4l2_fill_pix_format(&f->fmt.pix, &mbus_fmt);
        /* s_mbus_fmt overwrites f->fmt.pix.field, restore it */
index 2b0ab26e11e8e6a03d9d9505108ea55a5e0a0ee2..ccf548c255f121c576cad2e884c4e94e4bb1e3b1 100644 (file)
@@ -69,7 +69,7 @@ static int ivtv_s_video_encoding(struct cx2341x_handler *cxhdl, u32 val)
        /* fix videodecoder resolution */
        fmt.width = cxhdl->width / (is_mpeg1 ? 2 : 1);
        fmt.height = cxhdl->height;
-       fmt.code = V4L2_MBUS_FMT_FIXED;
+       fmt.code = MEDIA_BUS_FMT_FIXED;
        v4l2_subdev_call(itv->sd_video, video, s_mbus_fmt, &fmt);
        return 0;
 }
index 3e0cb77d5930fb7647db825081628fba2351cc8c..4d8ee18c3feb17978d048c3bbec8c5e4efe79763 100644 (file)
@@ -595,7 +595,7 @@ static int ivtv_s_fmt_vid_cap(struct file *file, void *fh, struct v4l2_format *f
                fmt->fmt.pix.width /= 2;
        mbus_fmt.width = fmt->fmt.pix.width;
        mbus_fmt.height = h;
-       mbus_fmt.code = V4L2_MBUS_FMT_FIXED;
+       mbus_fmt.code = MEDIA_BUS_FMT_FIXED;
        v4l2_subdev_call(itv->sd_video, video, s_mbus_fmt, &mbus_fmt);
        return ivtv_g_fmt_vid_cap(file, fh, fmt);
 }
index e4ea85fd1b23b07ed75ff67bd5fe4f14ac5528ce..8b3bb78b503b165a7aa366c68819a99adbd28c4a 100644 (file)
@@ -140,7 +140,7 @@ static int empress_s_fmt_vid_cap(struct file *file, void *priv,
        struct saa7134_dev *dev = video_drvdata(file);
        struct v4l2_mbus_framefmt mbus_fmt;
 
-       v4l2_fill_mbus_format(&mbus_fmt, &f->fmt.pix, V4L2_MBUS_FMT_FIXED);
+       v4l2_fill_mbus_format(&mbus_fmt, &f->fmt.pix, MEDIA_BUS_FMT_FIXED);
        saa_call_all(dev, video, s_mbus_fmt, &mbus_fmt);
        v4l2_fill_pix_format(&f->fmt.pix, &mbus_fmt);
 
@@ -157,7 +157,7 @@ static int empress_try_fmt_vid_cap(struct file *file, void *priv,
        struct saa7134_dev *dev = video_drvdata(file);
        struct v4l2_mbus_framefmt mbus_fmt;
 
-       v4l2_fill_mbus_format(&mbus_fmt, &f->fmt.pix, V4L2_MBUS_FMT_FIXED);
+       v4l2_fill_mbus_format(&mbus_fmt, &f->fmt.pix, MEDIA_BUS_FMT_FIXED);
        saa_call_all(dev, video, try_mbus_fmt, &mbus_fmt);
        v4l2_fill_pix_format(&f->fmt.pix, &mbus_fmt);