aboutsummaryrefslogtreecommitdiffstats
path: root/samples
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil-cisco@xs4all.nl>2019-01-21 06:14:32 -0500
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2019-01-25 15:47:06 -0500
commit60b6527952edf59f9c86c04fd8f91019ce77a0a6 (patch)
treed27921f614cc5b5a289d2bfad37168e53a8a68b1 /samples
parent947e3b3cf190929604965ab06588ff025fbec2b3 (diff)
media: v4l2-pci-skeleton.c: fix outdated irq code
Fix the outdated irq example code. It is under an #ifdef TODO so it is never actually compiled and this code was never compiled. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'samples')
-rw-r--r--samples/v4l/v4l2-pci-skeleton.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/samples/v4l/v4l2-pci-skeleton.c b/samples/v4l/v4l2-pci-skeleton.c
index 27ec30952cfa..758ced8c3d06 100644
--- a/samples/v4l/v4l2-pci-skeleton.c
+++ b/samples/v4l/v4l2-pci-skeleton.c
@@ -139,16 +139,16 @@ static irqreturn_t skeleton_irq(int irq, void *dev_id)
139 spin_lock(&skel->qlock); 139 spin_lock(&skel->qlock);
140 list_del(&new_buf->list); 140 list_del(&new_buf->list);
141 spin_unlock(&skel->qlock); 141 spin_unlock(&skel->qlock);
142 v4l2_get_timestamp(&new_buf->vb.v4l2_buf.timestamp); 142 new_buf->vb.vb2_buf.timestamp = ktime_get_ns();
143 new_buf->vb.v4l2_buf.sequence = skel->sequence++; 143 new_buf->vb.sequence = skel->sequence++;
144 new_buf->vb.v4l2_buf.field = skel->field; 144 new_buf->vb.field = skel->field;
145 if (skel->format.field == V4L2_FIELD_ALTERNATE) { 145 if (skel->format.field == V4L2_FIELD_ALTERNATE) {
146 if (skel->field == V4L2_FIELD_BOTTOM) 146 if (skel->field == V4L2_FIELD_BOTTOM)
147 skel->field = V4L2_FIELD_TOP; 147 skel->field = V4L2_FIELD_TOP;
148 else if (skel->field == V4L2_FIELD_TOP) 148 else if (skel->field == V4L2_FIELD_TOP)
149 skel->field = V4L2_FIELD_BOTTOM; 149 skel->field = V4L2_FIELD_BOTTOM;
150 } 150 }
151 vb2_buffer_done(&new_buf->vb, VB2_BUF_STATE_DONE); 151 vb2_buffer_done(&new_buf->vb.vb2_buf, VB2_BUF_STATE_DONE);
152 } 152 }
153#endif 153#endif
154 return IRQ_HANDLED; 154 return IRQ_HANDLED;