From patchwork Mon Jan 21 11:14:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans Verkuil X-Patchwork-Id: 10773651 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5F864746 for ; Mon, 21 Jan 2019 11:14:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4DAEC296C2 for ; Mon, 21 Jan 2019 11:14:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 41EFA29C77; Mon, 21 Jan 2019 11:14:39 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BEA11296C2 for ; Mon, 21 Jan 2019 11:14:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727430AbfAULOi (ORCPT ); Mon, 21 Jan 2019 06:14:38 -0500 Received: from lb2-smtp-cloud7.xs4all.net ([194.109.24.28]:60650 "EHLO lb2-smtp-cloud7.xs4all.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726165AbfAULOh (ORCPT ); Mon, 21 Jan 2019 06:14:37 -0500 Received: from [192.168.2.10] ([212.251.195.8]) by smtp-cloud7.xs4all.net with ESMTPA id lXXEgXPiOBDyIlXXIgOUAH; Mon, 21 Jan 2019 12:14:36 +0100 To: Linux Media Mailing List From: Hans Verkuil Subject: [PATCH] v4l2-pci-skeleton.c: fix outdated irq code Message-ID: Date: Mon, 21 Jan 2019 12:14:32 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 Content-Language: en-US X-CMAE-Envelope: MS4wfFnkTqSZqr9Jy10W4dEoyzuSDNZSMFwUYAOTsmLJhigHu5HgCsrXBBcwMR7v8liaDKLRMHEd8r2tTzghiphn6gWvYH/Wt1pZl/Bvstr8pyfkVusKC1cB MeP04QiIq41jUFFkb344uOMfJfn5ci/bgOsGDKiBt3JEOoU0gFwWWIrOfNjiaAbTFuBMqEjvE/WTOw== Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 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) spin_lock(&skel->qlock); list_del(&new_buf->list); spin_unlock(&skel->qlock); - v4l2_get_timestamp(&new_buf->vb.v4l2_buf.timestamp); - new_buf->vb.v4l2_buf.sequence = skel->sequence++; - new_buf->vb.v4l2_buf.field = skel->field; + new_buf->vb.vb2_buf.timestamp = ktime_get_ns(); + new_buf->vb.sequence = skel->sequence++; + new_buf->vb.field = skel->field; if (skel->format.field == V4L2_FIELD_ALTERNATE) { if (skel->field == V4L2_FIELD_BOTTOM) skel->field = V4L2_FIELD_TOP; else if (skel->field == V4L2_FIELD_TOP) skel->field = V4L2_FIELD_BOTTOM; } - vb2_buffer_done(&new_buf->vb, VB2_BUF_STATE_DONE); + vb2_buffer_done(&new_buf->vb.vb2_buf, VB2_BUF_STATE_DONE); } #endif return IRQ_HANDLED;