diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2019-05-10 11:40:35 -0700 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2019-05-10 11:40:35 -0700 |
commit | 14e0c7317ed58bcd15af5c3d09818ee0f2e3984c (patch) | |
tree | f9b63dc681574484c23c6b01be81f17cf9c64d6a /drivers/input/rmi4 | |
parent | 3a349763cf11e63534b8f2d302f2d0c790566497 (diff) | |
parent | 0981949da8f7498b96c6e0ae60680865ca283bf1 (diff) |
Merge branch 'next' into for-linus
Prepare input updates for 5.2 merge window.
Diffstat (limited to 'drivers/input/rmi4')
-rw-r--r-- | drivers/input/rmi4/rmi_f54.c | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/drivers/input/rmi4/rmi_f54.c b/drivers/input/rmi4/rmi_f54.c index a6f515bcab22..516fea06ed59 100644 --- a/drivers/input/rmi4/rmi_f54.c +++ b/drivers/input/rmi4/rmi_f54.c @@ -456,25 +456,15 @@ static int rmi_f54_vidioc_fmt(struct file *file, void *priv, static int rmi_f54_vidioc_enum_fmt(struct file *file, void *priv, struct v4l2_fmtdesc *fmt) { + struct f54_data *f54 = video_drvdata(file); + if (fmt->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) return -EINVAL; - switch (fmt->index) { - case 0: - fmt->pixelformat = V4L2_TCH_FMT_DELTA_TD16; - break; - - case 1: - fmt->pixelformat = V4L2_TCH_FMT_DELTA_TD08; - break; - - case 2: - fmt->pixelformat = V4L2_TCH_FMT_TU16; - break; - - default: + if (fmt->index) return -EINVAL; - } + + fmt->pixelformat = f54->format.pixelformat; return 0; } @@ -692,6 +682,7 @@ static int rmi_f54_probe(struct rmi_function *fn) return -ENOMEM; rmi_f54_create_input_map(f54); + rmi_f54_set_input(f54, 0); /* register video device */ strlcpy(f54->v4l2.name, F54_NAME, sizeof(f54->v4l2.name)); |