From patchwork Tue Oct 12 06:01:11 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 246921 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o9C623lN024126 for ; Tue, 12 Oct 2010 06:02:03 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753126Ab0JLGB7 (ORCPT ); Tue, 12 Oct 2010 02:01:59 -0400 Received: from mail-ww0-f44.google.com ([74.125.82.44]:64369 "EHLO mail-ww0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753320Ab0JLGB7 (ORCPT ); Tue, 12 Oct 2010 02:01:59 -0400 Received: by wwj40 with SMTP id 40so4607785wwj.1 for ; Mon, 11 Oct 2010 23:01:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:mime-version:content-type:content-disposition:user-agent; bh=YRHvCM/4RdPYACpwP/jKNUaavUhmp+2JfPWG/g8LH50=; b=iNXyAw6qWY6W4t5z0bf3rVXIcsem+6HMRJAph9HMQrpmohrMlBxspO7gEIOItMscsq JVNktWJ85I5X2bybco6m2ZynByPv9mwUdf5yNtYd8a5Z2xbaPjZe9M7E51/dykYGEzeW fr8GcFxMmwQ2Y6Q4ozuNn99tRM/sy9dL2pA/s= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:mime-version:content-type :content-disposition:user-agent; b=KOch3Meo/QONZC4wCbVeu6aJMcggTC/bJQgwDOsFx7QoQd0i1Xj0IITQJ8nau+7fbA 4XcvxkCblkFr/fVWNz2OESI/uG/6T91iTFVxue4d6z5Caew7F9beb4+RHDTx0F8AH/dN KIcU5A6llfJojCAztY1+7+aP61YqXNMYbK90Q= Received: by 10.216.157.81 with SMTP id n59mr6211097wek.84.1286863317358; Mon, 11 Oct 2010 23:01:57 -0700 (PDT) Received: from bicker (h3f06.n1.ips.mtn.co.ug [41.210.191.6]) by mx.google.com with ESMTPS id k4sm45585weq.9.2010.10.11.23.01.50 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 11 Oct 2010 23:01:56 -0700 (PDT) Date: Tue, 12 Oct 2010 08:01:11 +0200 From: Dan Carpenter To: Mauro Carvalho Chehab Cc: Jarod Wilson , linux-media@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [patch -next] V4L/DVB: IR/streamzap: fix usec to nsec conversion Message-ID: <20101012060110.GA13176@bicker> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) 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.3 (demeter1.kernel.org [140.211.167.41]); Tue, 12 Oct 2010 06:02:03 +0000 (UTC) diff --git a/drivers/media/IR/streamzap.c b/drivers/media/IR/streamzap.c index 2cf57e6..d5d3cee 100644 --- a/drivers/media/IR/streamzap.c +++ b/drivers/media/IR/streamzap.c @@ -221,7 +221,7 @@ static void streamzap_callback(struct urb *urb) struct streamzap_ir *sz; unsigned int i; int len; - static int timeout = (((STREAMZAP_TIMEOUT * STREAMZAP_RESOLUTION) & + static int timeout = (((STREAMZAP_TIMEOUT * STREAMZAP_RESOLUTION * 1000) & IR_MAX_DURATION) | 0x03000000); if (!urb) @@ -273,7 +273,7 @@ static void streamzap_callback(struct urb *urb) struct ir_raw_event rawir; rawir.pulse = false; - rawir.duration = timeout * 1000; + rawir.duration = timeout; sz->idle = true; if (sz->timeout_enabled) sz_push(sz, rawir);