mirror of
https://github.com/torvalds/linux.git
synced 2026-05-26 08:02:27 +02:00
media: meson-ge2d: Access v4l2_fh from file
The v4l2_fh associated with an open file handle is now guaranteed to be available in file->private_data, initialised by v4l2_fh_add(). Access the v4l2_fh, and from there the driver-specific structure, from the file * in all ioctl handlers. Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
This commit is contained in:
parent
334f228752
commit
e732b1221d
|
|
@ -457,7 +457,7 @@ static int vidioc_enum_fmt(struct file *file, void *priv, struct v4l2_fmtdesc *f
|
|||
static int vidioc_g_selection(struct file *file, void *priv,
|
||||
struct v4l2_selection *s)
|
||||
{
|
||||
struct ge2d_ctx *ctx = priv;
|
||||
struct ge2d_ctx *ctx = file_to_ge2d_ctx(file);
|
||||
struct ge2d_frame *f;
|
||||
bool use_frame = false;
|
||||
|
||||
|
|
@ -507,7 +507,7 @@ static int vidioc_g_selection(struct file *file, void *priv,
|
|||
static int vidioc_s_selection(struct file *file, void *priv,
|
||||
struct v4l2_selection *s)
|
||||
{
|
||||
struct ge2d_ctx *ctx = priv;
|
||||
struct ge2d_ctx *ctx = file_to_ge2d_ctx(file);
|
||||
struct meson_ge2d *ge2d = ctx->ge2d;
|
||||
struct ge2d_frame *f;
|
||||
int ret = 0;
|
||||
|
|
@ -574,8 +574,8 @@ static void vidioc_setup_cap_fmt(struct ge2d_ctx *ctx, struct v4l2_pix_format *f
|
|||
|
||||
static int vidioc_try_fmt_cap(struct file *file, void *priv, struct v4l2_format *f)
|
||||
{
|
||||
struct ge2d_ctx *ctx = file_to_ge2d_ctx(file);
|
||||
const struct ge2d_fmt *fmt = find_fmt(f);
|
||||
struct ge2d_ctx *ctx = priv;
|
||||
struct v4l2_pix_format fmt_cap;
|
||||
|
||||
vidioc_setup_cap_fmt(ctx, &fmt_cap);
|
||||
|
|
@ -595,7 +595,7 @@ static int vidioc_try_fmt_cap(struct file *file, void *priv, struct v4l2_format
|
|||
|
||||
static int vidioc_s_fmt_cap(struct file *file, void *priv, struct v4l2_format *f)
|
||||
{
|
||||
struct ge2d_ctx *ctx = priv;
|
||||
struct ge2d_ctx *ctx = file_to_ge2d_ctx(file);
|
||||
struct meson_ge2d *ge2d = ctx->ge2d;
|
||||
struct vb2_queue *vq;
|
||||
struct ge2d_frame *frm;
|
||||
|
|
@ -631,7 +631,7 @@ static int vidioc_s_fmt_cap(struct file *file, void *priv, struct v4l2_format *f
|
|||
|
||||
static int vidioc_g_fmt(struct file *file, void *priv, struct v4l2_format *f)
|
||||
{
|
||||
struct ge2d_ctx *ctx = priv;
|
||||
struct ge2d_ctx *ctx = file_to_ge2d_ctx(file);
|
||||
struct vb2_queue *vq;
|
||||
struct ge2d_frame *frm;
|
||||
|
||||
|
|
@ -670,7 +670,7 @@ static int vidioc_try_fmt_out(struct file *file, void *priv, struct v4l2_format
|
|||
|
||||
static int vidioc_s_fmt_out(struct file *file, void *priv, struct v4l2_format *f)
|
||||
{
|
||||
struct ge2d_ctx *ctx = priv;
|
||||
struct ge2d_ctx *ctx = file_to_ge2d_ctx(file);
|
||||
struct meson_ge2d *ge2d = ctx->ge2d;
|
||||
struct vb2_queue *vq;
|
||||
struct ge2d_frame *frm, *frm_cap;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user