From patchwork Sat Mar 26 01:54:34 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 665461 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 p2Q1surJ001685 for ; Sat, 26 Mar 2011 01:54:56 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934294Ab1CZByx (ORCPT ); Fri, 25 Mar 2011 21:54:53 -0400 Received: from mail-pv0-f174.google.com ([74.125.83.174]:58721 "EHLO mail-pv0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934174Ab1CZByx (ORCPT ); Fri, 25 Mar 2011 21:54:53 -0400 Received: by pvg12 with SMTP id 12so230811pvg.19 for ; Fri, 25 Mar 2011 18:54:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:date:from:to:cc:subject:message-id:mime-version :content-type:content-disposition:user-agent; bh=91tCt90TbxPqPaKnfLn3ySzMYfSNWhRX/X0C0ugkPCg=; b=V3giHj6ldZVdQ9AuR51lFu0M4yHun/jHigYmnmIBsS7K5DD8jDVeHMCIIAUoo6wrlf 5jSRkvHr+gpUuMyU3q6NnEXRuf6s+OtwSRZh+8nvSq1qHQAW2PJJtF1Li/8/m+vhBJoE eN0Jjhvlkw6775xxcEoZgsW3hfpQwmgKYMtVo= 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=Ikm2CI5HeCXy00+mNiHS5fLsbnVFwhp/CrEq+cHFv8S2tkm0IBAdPcThY3u/l5I09y XMsFiiZdNlgGLjPl7+K615pz/xcCRyGuwhCTOigd3eg+prFgc3JfqRxIIch6HRwa3CoJ ee26rh2kvhY1RVsFCJVk5L5zroSssZlpEURgk= Received: by 10.142.1.12 with SMTP id 12mr1124048wfa.393.1301104492323; Fri, 25 Mar 2011 18:54:52 -0700 (PDT) Received: from bicker ([212.49.88.34]) by mx.google.com with ESMTPS id 25sm2075038wfb.22.2011.03.25.18.54.45 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 25 Mar 2011 18:54:51 -0700 (PDT) Date: Sat, 26 Mar 2011 04:54:34 +0300 From: Dan Carpenter To: Mike Isely Cc: Mauro Carvalho Chehab , linux-media@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH 5/5] [media] pvrusb2: delete generic_standards_cnt Message-ID: <20110326015434.GJ2008@bicker> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) 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 (demeter1.kernel.org [140.211.167.41]); Sat, 26 Mar 2011 01:55:14 +0000 (UTC) diff --git a/drivers/media/video/pvrusb2/pvrusb2-std.c b/drivers/media/video/pvrusb2/pvrusb2-std.c index d5a679f..9bebc08 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-std.c +++ b/drivers/media/video/pvrusb2/pvrusb2-std.c @@ -287,13 +287,11 @@ static struct v4l2_standard generic_standards[] = { } }; -#define generic_standards_cnt ARRAY_SIZE(generic_standards) - static struct v4l2_standard *match_std(v4l2_std_id id) { unsigned int idx; - for (idx = 0; idx < generic_standards_cnt; idx++) { + for (idx = 0; idx < ARRAY_SIZE(generic_standards); idx++) { if (generic_standards[idx].id & id) return generic_standards + idx; }