From patchwork Fri Apr 3 17:13:08 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Russell King X-Patchwork-Id: 6158481 Return-Path: X-Original-To: patchwork-linux-omap@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 CE3F79F2EC for ; Fri, 3 Apr 2015 17:13:22 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0C2C3203EC for ; Fri, 3 Apr 2015 17:13:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 21216203AC for ; Fri, 3 Apr 2015 17:13:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753865AbbDCRNR (ORCPT ); Fri, 3 Apr 2015 13:13:17 -0400 Received: from pandora.arm.linux.org.uk ([78.32.30.218]:33789 "EHLO pandora.arm.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753856AbbDCRNP (ORCPT ); Fri, 3 Apr 2015 13:13:15 -0400 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=0nNvcD0aE3hDUDQUKNrfUmalZu5Y3pav35L7EzcpkvA=; b=DGLVh3g1m1MBUo14DV2LqPYonYgFE0b+KVQqEQQXY5WzaOjnCbOx1RHWk/03LRrPC5Wx0Yr02jlcqyUPMfbzOr+b68VaMrwy1RPxOtIvbGielgkuBDc+EQUvkuv1TKmAD9g/4M5UccET8XAjLQH4+NgQoBuwFg3oXwN2SVNi+Xc=; Received: from e0022681537dd.dyn.arm.linux.org.uk ([2002:4e20:1eda:1:222:68ff:fe15:37dd]:44303 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 1Ye59d-0002qJ-0D; Fri, 03 Apr 2015 18:13:13 +0100 Received: from rmk by rmk-PC.arm.linux.org.uk with local (Exim 4.76) (envelope-from ) id 1Ye59Y-0001BV-NY; Fri, 03 Apr 2015 18:13:08 +0100 In-Reply-To: <20150403171149.GC13898@n2100.arm.linux.org.uk> References: <20150403171149.GC13898@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 Cc: Roland Stigge Subject: [PATCH 09/14] ARM: lpc32xx: convert to use clkdev_add_table() MIME-Version: 1.0 Content-Disposition: inline Message-Id: Date: Fri, 03 Apr 2015 18:13:08 +0100 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID,T_RP_MATCHES_RCVD,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.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 LPC32xx to use the correct interface. Signed-off-by: Russell King --- arch/arm/mach-lpc32xx/clock.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/arch/arm/mach-lpc32xx/clock.c b/arch/arm/mach-lpc32xx/clock.c index dd5d6f532e8c..661c8f4b2310 100644 --- a/arch/arm/mach-lpc32xx/clock.c +++ b/arch/arm/mach-lpc32xx/clock.c @@ -1238,10 +1238,7 @@ static struct clk_lookup lookups[] = { static int __init clk_init(void) { - int i; - - for (i = 0; i < ARRAY_SIZE(lookups); i++) - clkdev_add(&lookups[i]); + clkdev_add_table(lookups, ARRAY_SIZE(lookups)); /* * Setup muxed SYSCLK for HCLK PLL base -this selects the