X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=kernel%2Fdrivers%2Finput%2Ftouchscreen%2Fsur40.c;h=45b466e3bbe84372b68ab6a56abfc177adef733f;hb=52f993b8e89487ec9ee15a7fb4979e0f09a45b27;hp=d214f22ed305aab0773fe783c2e692c62fc342eb;hpb=c189ccac5702322ed843fe17057035b7222a59b6;p=kvmfornfv.git diff --git a/kernel/drivers/input/touchscreen/sur40.c b/kernel/drivers/input/touchscreen/sur40.c index d214f22ed..45b466e3b 100644 --- a/kernel/drivers/input/touchscreen/sur40.c +++ b/kernel/drivers/input/touchscreen/sur40.c @@ -126,7 +126,7 @@ struct sur40_image_header { #define VIDEO_PACKET_SIZE 16384 /* polling interval (ms) */ -#define POLL_INTERVAL 4 +#define POLL_INTERVAL 1 /* maximum number of contacts FIXME: this is a guess? */ #define MAX_CONTACTS 64 @@ -441,7 +441,7 @@ static void sur40_process_video(struct sur40_state *sur40) /* return error if streaming was stopped in the meantime */ if (sur40->sequence == -1) - goto err_poll; + return; /* mark as finished */ v4l2_get_timestamp(&new_buf->vb.timestamp); @@ -730,6 +730,7 @@ static int sur40_start_streaming(struct vb2_queue *vq, unsigned int count) static void sur40_stop_streaming(struct vb2_queue *vq) { struct sur40_state *sur40 = vb2_get_drv_priv(vq); + vb2_wait_for_all_buffers(vq); sur40->sequence = -1; /* Release all active buffers */