diff options
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/serio/hyperv-keyboard.c | 10 | ||||
-rw-r--r-- | drivers/input/touchscreen/sur40.c | 13 |
2 files changed, 6 insertions, 17 deletions
diff --git a/drivers/input/serio/hyperv-keyboard.c b/drivers/input/serio/hyperv-keyboard.c index e74e5d6e5f9f..c948866edf87 100644 --- a/drivers/input/serio/hyperv-keyboard.c +++ b/drivers/input/serio/hyperv-keyboard.c @@ -412,16 +412,6 @@ static int hv_kbd_remove(struct hv_device *hv_dev) return 0; } -/* - * Keyboard GUID - * {f912ad6d-2b17-48ea-bd65-f927a61c7684} - */ -#define HV_KBD_GUID \ - .guid = { \ - 0x6d, 0xad, 0x12, 0xf9, 0x17, 0x2b, 0xea, 0x48, \ - 0xbd, 0x65, 0xf9, 0x27, 0xa6, 0x1c, 0x76, 0x84 \ - } - static const struct hv_vmbus_device_id id_table[] = { /* Keyboard guid */ { HV_KBD_GUID, }, diff --git a/drivers/input/touchscreen/sur40.c b/drivers/input/touchscreen/sur40.c index d214f22ed305..b6c4d03de340 100644 --- a/drivers/input/touchscreen/sur40.c +++ b/drivers/input/touchscreen/sur40.c @@ -444,7 +444,7 @@ static void sur40_process_video(struct sur40_state *sur40) goto err_poll; /* mark as finished */ - v4l2_get_timestamp(&new_buf->vb.timestamp); + new_buf->vb.vb2_buf.timestamp = ktime_get_ns(); new_buf->vb.sequence = sur40->sequence++; new_buf->vb.field = V4L2_FIELD_NONE; vb2_buffer_done(&new_buf->vb.vb2_buf, VB2_BUF_STATE_DONE); @@ -644,22 +644,21 @@ static void sur40_disconnect(struct usb_interface *interface) * minimum number: many DMA engines need a minimum of 2 buffers in the * queue and you need to have another available for userspace processing. */ -static int sur40_queue_setup(struct vb2_queue *q, const void *parg, +static int sur40_queue_setup(struct vb2_queue *q, unsigned int *nbuffers, unsigned int *nplanes, unsigned int sizes[], void *alloc_ctxs[]) { - const struct v4l2_format *fmt = parg; struct sur40_state *sur40 = vb2_get_drv_priv(q); if (q->num_buffers + *nbuffers < 3) *nbuffers = 3 - q->num_buffers; + alloc_ctxs[0] = sur40->alloc_ctx; - if (fmt && fmt->fmt.pix.sizeimage < sur40_video_format.sizeimage) - return -EINVAL; + if (*nplanes) + return sizes[0] < sur40_video_format.sizeimage ? -EINVAL : 0; *nplanes = 1; - sizes[0] = fmt ? fmt->fmt.pix.sizeimage : sur40_video_format.sizeimage; - alloc_ctxs[0] = sur40->alloc_ctx; + sizes[0] = sur40_video_format.sizeimage; return 0; } |