lkml.org 
[lkml]   [2017]   [Sep]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4 2/3] media: ov7670: Add the get_fmt callback
Hi Wenyou,

On Mon, Sep 18, 2017 at 02:45:13PM +0800, Wenyou Yang wrote:
> @@ -998,8 +1002,15 @@ static int ov7670_set_fmt(struct v4l2_subdev *sd,
> ret = ov7670_try_fmt_internal(sd, &format->format, NULL, NULL);
> if (ret)
> return ret;
> - cfg->try_fmt = format->format;
> +#ifdef CONFIG_VIDEO_V4L2_SUBDEV_API
> + struct v4l2_mbus_framefmt *mbus_fmt;

This will emit a compiler warning at least.

> +
> + mbus_fmt = v4l2_subdev_get_try_format(sd, cfg, format->pad);
> + *mbus_fmt = format->format;
> return 0;
> +#else
> + return -ENOTTY;
> +#endif
> }
>
> ret = ov7670_try_fmt_internal(sd, &format->format, &ovfmt, &wsize);

--
Sakari Ailus
e-mail: sakari.ailus@iki.fi

\
 
 \ /
  Last update: 2017-09-18 09:37    [W:0.054 / U:1.556 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site