From patchwork Sat Dec 6 23:02:08 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rickard Strandqvist X-Patchwork-Id: 5450811 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id A3DC9BEEA8 for ; Sat, 6 Dec 2014 23:02:15 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 972652012E for ; Sat, 6 Dec 2014 23:02:14 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8308C200F4 for ; Sat, 6 Dec 2014 23:02:13 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XxOKR-0003Fw-Tx; Sat, 06 Dec 2014 22:59:55 +0000 Received: from mail-wi0-f181.google.com ([209.85.212.181]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XxOKN-0003DO-Pq for linux-arm-kernel@lists.infradead.org; Sat, 06 Dec 2014 22:59:53 +0000 Received: by mail-wi0-f181.google.com with SMTP id r20so1750586wiv.14 for ; Sat, 06 Dec 2014 14:59:28 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=3DvfHSGR9g+p2o0w7ljHY9WjtYVdnmeTXiOJRqxLYpk=; b=cRfYvqjhMfBW37pdrpHmokbw26ZMShfBLNqXMZORk9eA6+gYu3Axxlq8GjAJ9gT4HL egqNziJ1fe8j6kQAN92h6hFano9Ep8/hkg7zEJO+kCVfJWiM14H73Cb3CwFrsQCLs4SD C3SewJx9t5WBrBzBYRBZwlEZlNfh1mThA6o8WAzpeF/i1zlZVTbPr61ZJKqhEydIEHIK AOmh1qAsNenl/FYSC6zJjBfIWuTQlM0ReBbRPyAOWMLShZb3/8qz6B9fVQryyeR+Z+48 KQDcoHYINPs4K3TSXAGP60mZrKgjxGclGwMfH8L+Q5hL/v04wYRjjI7XRssDdtfORVrl eVOQ== X-Gm-Message-State: ALoCoQnKjmz/DUX3tiv0FHlOMDe8mHskBphpE6yw+2OTBZOrpg1xDyqDQ/UQEu3+Si9g3W3Ngw3o X-Received: by 10.180.205.163 with SMTP id lh3mr14084659wic.63.1417906768456; Sat, 06 Dec 2014 14:59:28 -0800 (PST) Received: from localhost.localdomain (h-246-111.a218.priv.bahnhof.se. [85.24.246.111]) by mx.google.com with ESMTPSA id ep9sm3515874wid.3.2014.12.06.14.59.27 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 06 Dec 2014 14:59:27 -0800 (PST) From: Rickard Strandqvist To: Sekhar Nori , Kevin Hilman Subject: [PATCH] arch: arm: mach-davinci: cdce949.c: Remove unused function Date: Sun, 7 Dec 2014 00:02:08 +0100 Message-Id: <1417906928-5728-1-git-send-email-rickard_strandqvist@spectrumdigital.se> X-Mailer: git-send-email 1.7.10.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20141206_145952_006535_36B478A3 X-CRM114-Status: GOOD ( 13.13 ) X-Spam-Score: -0.7 (/) Cc: Russell King , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Rickard Strandqvist X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, 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 Remove the function cdce_set_rate() that is not used anywhere. This was partially found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist --- arch/arm/mach-davinci/cdce949.c | 37 -------------------------- arch/arm/mach-davinci/include/mach/cdce949.h | 2 -- 2 files changed, 39 deletions(-) diff --git a/arch/arm/mach-davinci/cdce949.c b/arch/arm/mach-davinci/cdce949.c index abafb92..bccac4a 100644 --- a/arch/arm/mach-davinci/cdce949.c +++ b/arch/arm/mach-davinci/cdce949.c @@ -212,43 +212,6 @@ static struct cdce_output output_list[] = { [5] = { cdce_y5_freqs, ARRAY_SIZE(cdce_y5_freqs) }, }; -int cdce_set_rate(struct clk *clk, unsigned long rate) -{ - int i, ret = 0; - struct cdce_freq *freq_table = output_list[clk->lpsc].freq_table; - struct cdce_reg *regs = NULL; - - if (!cdce_i2c_client) - return -ENODEV; - - if (!freq_table) - return -EINVAL; - - for (i = 0; i < output_list[clk->lpsc].size; i++) { - if (freq_table[i].frequency == rate / 1000) { - regs = freq_table[i].reglist; - break; - } - } - - if (!regs) - return -EINVAL; - - mutex_lock(&cdce_mutex); - for (i = 0; regs[i].addr; i++) { - ret = i2c_smbus_write_byte_data(cdce_i2c_client, - regs[i].addr | 0x80, regs[i].val); - if (ret) - break; - } - mutex_unlock(&cdce_mutex); - - if (!ret) - clk->rate = rate; - - return ret; -} - static int cdce_probe(struct i2c_client *client, const struct i2c_device_id *id) { diff --git a/arch/arm/mach-davinci/include/mach/cdce949.h b/arch/arm/mach-davinci/include/mach/cdce949.h index c73331f..2280e0b 100644 --- a/arch/arm/mach-davinci/include/mach/cdce949.h +++ b/arch/arm/mach-davinci/include/mach/cdce949.h @@ -14,6 +14,4 @@ #include -int cdce_set_rate(struct clk *clk, unsigned long rate); - #endif