From patchwork Mon Mar 2 17:06:16 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Russell King X-Patchwork-Id: 5915671 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 767FE9F380 for ; Mon, 2 Mar 2015 17:07:48 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 62040200B4 for ; Mon, 2 Mar 2015 17:07:47 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 4798B201F2 for ; Mon, 2 Mar 2015 17:07:46 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 4DCBB260654; Mon, 2 Mar 2015 18:07:40 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, NO_DNS_FOR_FROM, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id B117F2605EA; Mon, 2 Mar 2015 18:06:37 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id C6A1026060C; Mon, 2 Mar 2015 18:06:36 +0100 (CET) Received: from pandora.arm.linux.org.uk (pandora.arm.linux.org.uk [78.32.30.218]) by alsa0.perex.cz (Postfix) with ESMTP id 148292605E4 for ; Mon, 2 Mar 2015 18:06:22 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=arm.linux.org.uk; s=pandora-2014; h=Date:Sender:Message-Id:Content-Type:Content-Transfer-Encoding:MIME-Version:Subject:Cc:To:From:References:In-Reply-To; bh=V+93gcNpyMuZGJGsoPFc13EWop0r/EOTtEjwykgccPI=; b=SyaVS7kMGj7ve3oXuXNhiJdHLCSXCHqwrjRInbgg8+ALXW5SflS5ELeSl3GFVcVmd1chEIXV9FgTnAO6xSqYsqK68r+wtejiPE2oHQLQqwrUxU3KyOIiY5wabWjBJrPwfuukzYkn59Vtboe/0l8ByRLvSYdl+AO8ixANqR8NliI=; Received: from e0022681537dd.dyn.arm.linux.org.uk ([2002:4e20:1eda:1:222:68ff:fe15:37dd]:44991 helo=rmk-PC.arm.linux.org.uk) by pandora.arm.linux.org.uk with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.82_1-5b7a7c0-XX) (envelope-from ) id 1YSTnQ-0004BQ-4Z; Mon, 02 Mar 2015 17:06:20 +0000 Received: from rmk by rmk-PC.arm.linux.org.uk with local (Exim 4.76) (envelope-from ) id 1YSTnM-0001Jc-LU; Mon, 02 Mar 2015 17:06:16 +0000 In-Reply-To: <20150302170538.GQ8656@n2100.arm.linux.org.uk> References: <20150302170538.GQ8656@n2100.arm.linux.org.uk> From: Russell King To: alsa-devel@alsa-project.org, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org, linux-omap@vger.kernel.org, linux-sh@vger.kernel.org MIME-Version: 1.0 Content-Disposition: inline Message-Id: Date: Mon, 02 Mar 2015 17:06:16 +0000 Cc: Stephen Boyd , Mike Turquette Subject: [alsa-devel] [PATCH 03/10] clk: versatile: convert Integrator IM/PD-1 to use clkdev_add_table() X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP We have always had an efficient way of registering a table of clock lookups - it's called clkdev_add_table(). However, some people seem to really love writing inefficient and unnecessary code. Convert Integrator IM-PD/1 to use the correct interface. Signed-off-by: Russell King --- drivers/clk/versatile/clk-impd1.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/clk/versatile/clk-impd1.c b/drivers/clk/versatile/clk-impd1.c index 1cc1330dc570..13e912e132d2 100644 --- a/drivers/clk/versatile/clk-impd1.c +++ b/drivers/clk/versatile/clk-impd1.c @@ -89,7 +89,6 @@ void integrator_impd1_clk_init(void __iomem *base, unsigned int id) struct impd1_clk *imc; struct clk *clk; struct clk *pclk; - int i; if (id > 3) { pr_crit("no more than 4 LMs can be attached\n"); @@ -150,8 +149,7 @@ void integrator_impd1_clk_init(void __iomem *base, unsigned int id) imc->clks[13] = clkdev_alloc(pclk, "apb_pclk", "lm%x:00600", id); imc->clks[14] = clkdev_alloc(clk, NULL, "lm%x:00600", id); - for (i = 0; i < ARRAY_SIZE(imc->clks); i++) - clkdev_add(imc->clks[i]); + clkdev_add_table(imc->clks, ARRAY_SIZE(imc->clks)); } EXPORT_SYMBOL_GPL(integrator_impd1_clk_init);