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: 6214 Return-path: Envelope-to: mchehab@pedra Delivery-date: Sat, 26 Mar 2011 08:12:50 -0300 Received: from mchehab by pedra with local (Exim 4.72) (envelope-from ) id 1Q3RQI-0002jX-Ip for mchehab@pedra; Sat, 26 Mar 2011 08:12:50 -0300 Received: from casper.infradead.org [85.118.1.10] by pedra with IMAP (fetchmail-6.3.17) for (single-drop); Sat, 26 Mar 2011 08:12:50 -0300 (BRT) Received: from vger.kernel.org ([209.132.180.67]) by casper.infradead.org with esmtp (Exim 4.72 #1 (Red Hat Linux)) id 1Q3Iii-0003LQ-Dk; Sat, 26 Mar 2011 01:55:16 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934294Ab1CZByx (ORCPT + 1 other); 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) Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Sender: The generic_standards_cnt define is only used in one place and it's more readable to just call ARRAY_SIZE(generic_standards) directly. Signed-off-by: Dan Carpenter Acked-By: Mike Isely --- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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; }