From patchwork Sat May 21 06:05:38 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Ringel X-Patchwork-Id: 805292 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.3) with ESMTP id p4L6601s023915 for ; Sat, 21 May 2011 06:06:00 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751694Ab1EUGFm (ORCPT ); Sat, 21 May 2011 02:05:42 -0400 Received: from mail-in-18.arcor-online.net ([151.189.21.58]:57518 "EHLO mail-in-18.arcor-online.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751493Ab1EUGFm (ORCPT ); Sat, 21 May 2011 02:05:42 -0400 Received: from mail-in-02-z2.arcor-online.net (mail-in-02-z2.arcor-online.net [151.189.8.14]) by mx.arcor.de (Postfix) with ESMTP id 3B7353DC746; Sat, 21 May 2011 08:05:40 +0200 (CEST) Received: from mail-in-01.arcor-online.net (mail-in-01.arcor-online.net [151.189.21.41]) by mail-in-02-z2.arcor-online.net (Postfix) with ESMTP id 3614D1754CF; Sat, 21 May 2011 08:05:40 +0200 (CEST) Received: from localhost.localdomain (dslb-188-106-191-188.pools.arcor-ip.net [188.106.191.188]) (Authenticated sender: stefan.ringel@arcor.de) by mail-in-01.arcor-online.net (Postfix) with ESMTPA id DCFF35A3AF; Sat, 21 May 2011 08:05:39 +0200 (CEST) X-DKIM: Sendmail DKIM Filter v2.8.2 mail-in-01.arcor-online.net DCFF35A3AF DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arcor.de; s=mail-in; t=1305957940; bh=BUkgKfKL/QgE43mM0F5xllAFS8HFsuc4Dsm/7cTZ9sU=; h=From:To:Cc:Subject:Date:Message-Id; b=WdIfE/IyzNVEW/ZY2CJZoC2F6TZiV8QZnHDenNa7UefdevU/beJPqkxPCeTu6ybSR xf0Z3gI1721PXuZ4dIVxUcEn4EPorPV5Lu8FGhcy1KJNZZIyEhw4+UnOsYLhC8trfu 2pfzkuE1DqU5p2J2cB6fCxVHqHIUiDrNLHOtzZRI= From: stefan.ringel@arcor.de To: linux-media@vger.kernel.org Cc: d.belimov@gmail.com, mchehab@redhat.com, Stefan Ringel Subject: [PATCH v2] tm6000: fix uninitialized field, change prink to dprintk Date: Sat, 21 May 2011 08:05:38 +0200 Message-Id: <1305957938-5830-1-git-send-email-stefan.ringel@arcor.de> X-Mailer: git-send-email 1.7.4.2 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Sat, 21 May 2011 06:06:00 +0000 (UTC) From: Stefan Ringel fix uninitialized field, change prink to dprintk Signed-off-by: Stefan Ringel --- drivers/staging/tm6000/tm6000-usb-isoc.h | 2 +- drivers/staging/tm6000/tm6000-video.c | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/staging/tm6000/tm6000-usb-isoc.h b/drivers/staging/tm6000/tm6000-usb-isoc.h index a9e61d9..084c2a8 100644 --- a/drivers/staging/tm6000/tm6000-usb-isoc.h +++ b/drivers/staging/tm6000/tm6000-usb-isoc.h @@ -39,7 +39,7 @@ struct usb_isoc_ctl { int pos, size, pktsize; /* Last field: ODD or EVEN? */ - int vfield; + int vfield, field; /* Stores incomplete commands */ u32 tmp_buf; diff --git a/drivers/staging/tm6000/tm6000-video.c b/drivers/staging/tm6000/tm6000-video.c index 4802396..4264064 100644 --- a/drivers/staging/tm6000/tm6000-video.c +++ b/drivers/staging/tm6000/tm6000-video.c @@ -334,6 +334,7 @@ static int copy_streams(u8 *data, unsigned long len, size = dev->isoc_ctl.size; pos = dev->isoc_ctl.pos; pktsize = dev->isoc_ctl.pktsize; + field = dev->isoc_ctl.field; } cpysize = (endp - ptr > size) ? size : endp - ptr; if (cpysize) { @@ -359,7 +360,8 @@ static int copy_streams(u8 *data, unsigned long len, /* Need some code to copy pts */ u32 pts; pts = *(u32 *)ptr; - printk(KERN_INFO "%s: field %d, PTS %x", dev->name, field, pts); + dprintk(dev, V4L2_DEBUG_ISOC, "field %d, PTS %x", + field, pts); break; } } @@ -371,6 +373,7 @@ static int copy_streams(u8 *data, unsigned long len, dev->isoc_ctl.pos = pos + cpysize; dev->isoc_ctl.size = size - cpysize; dev->isoc_ctl.cmd = cmd; + dev->isoc_ctl.field = field; dev->isoc_ctl.pktsize = pktsize - (endp - ptr); ptr += endp - ptr; } else {