From patchwork Fri May 1 08:34:01 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabian Frederick X-Patchwork-Id: 6308991 X-Patchwork-Delegate: rjw@sisk.pl Return-Path: X-Original-To: patchwork-linux-pm@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 9730C9F1C2 for ; Fri, 1 May 2015 08:34:48 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AFF0B2045A for ; Fri, 1 May 2015 08:34:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B2D0F203AA for ; Fri, 1 May 2015 08:34:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753393AbbEAIec (ORCPT ); Fri, 1 May 2015 04:34:32 -0400 Received: from mailrelay114.isp.belgacom.be ([195.238.20.141]:16268 "EHLO mailrelay114.isp.belgacom.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750935AbbEAIeP (ORCPT ); Fri, 1 May 2015 04:34:15 -0400 X-Belgacom-Dynamic: yes X-Cloudmark-SP-Filtered: true X-Cloudmark-SP-Result: v=1.1 cv=b5VF44rymZs9Y1DiFqPAMix8rWtyBsB+bu/OWkEeo3k= c=1 sm=2 a=IJv9LcIfAAAA:8 a=2DzhiT6HU1T8XWUcZ0AA:9 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2D3EACbOUNV/3lGsltcgwyBL7N2AQEBAQEBBQGBAphDAoFYPBEBAQEBAQEBgQpBBYNbAQEEViMQUTkeGYgvAccfAQEBByKGFoonBxaEFwWcOYEjhjyEU4lLI2CBJxyBUzwxgkUBAQE Received: from 121.70-178-91.adsl-dyn.isp.belgacom.be (HELO localhost.home.) ([91.178.70.121]) by relay.skynet.be with ESMTP; 01 May 2015 10:34:13 +0200 From: Fabian Frederick To: linux-kernel@vger.kernel.org Cc: Joe Perches , Viresh Kumar , Fabian Frederick , "Rafael J. Wysocki" , linux-pm@vger.kernel.org Subject: [PATCH V3 2/2 linux-next] cpufreq: pxa: make pxa_freqs arrays const Date: Fri, 1 May 2015 10:34:01 +0200 Message-Id: <1430469241-30556-2-git-send-email-fabf@skynet.be> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1430469241-30556-1-git-send-email-fabf@skynet.be> References: <1430469241-30556-1-git-send-email-fabf@skynet.be> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 pxa255_run_freqs and pxa255_turbo_freqs are only read. This patch updates arrays declaration, find_freq_tables() and its callsites. Suggested-by: Joe Perches Signed-off-by: Fabian Frederick --- Compiled but untested. drivers/cpufreq/pxa2xx-cpufreq.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/cpufreq/pxa2xx-cpufreq.c b/drivers/cpufreq/pxa2xx-cpufreq.c index fcf6e34..1d99c97 100644 --- a/drivers/cpufreq/pxa2xx-cpufreq.c +++ b/drivers/cpufreq/pxa2xx-cpufreq.c @@ -86,7 +86,7 @@ static unsigned int sdram_rows; /* Use the run mode frequencies for the CPUFREQ_POLICY_PERFORMANCE policy */ #define CCLKCFG CCLKCFG_TURBO | CCLKCFG_FCS -static struct pxa_freqs pxa255_run_freqs[] = +static const struct pxa_freqs pxa255_run_freqs[] = { /* CPU MEMBUS CCCR DIV2 CCLKCFG run turbo PXbus SDRAM */ { 99500, 99500, 0x121, 1, CCLKCFG, -1, -1}, /* 99, 99, 50, 50 */ @@ -98,7 +98,7 @@ static struct pxa_freqs pxa255_run_freqs[] = }; /* Use the turbo mode frequencies for the CPUFREQ_POLICY_POWERSAVE policy */ -static struct pxa_freqs pxa255_turbo_freqs[] = +static const struct pxa_freqs pxa255_turbo_freqs[] = { /* CPU MEMBUS CCCR DIV2 CCLKCFG run turbo PXbus SDRAM */ { 99500, 99500, 0x121, 1, CCLKCFG, -1, -1}, /* 99, 99, 50, 50 */ @@ -171,7 +171,7 @@ extern unsigned get_clk_frequency_khz(int info); #ifdef CONFIG_REGULATOR -static int pxa_cpufreq_change_voltage(struct pxa_freqs *pxa_freq) +static int pxa_cpufreq_change_voltage(const struct pxa_freqs *pxa_freq) { int ret = 0; int vmin, vmax; @@ -211,7 +211,7 @@ static void __init pxa_cpufreq_init_voltages(void) { } #endif static void find_freq_tables(struct cpufreq_frequency_table **freq_table, - struct pxa_freqs **pxa_freqs) + const struct pxa_freqs **pxa_freqs) { if (cpu_is_pxa25x()) { if (!pxa255_turbo_table) { @@ -270,7 +270,7 @@ static unsigned int pxa_cpufreq_get(unsigned int cpu) static int pxa_set_target(struct cpufreq_policy *policy, unsigned int idx) { struct cpufreq_frequency_table *pxa_freqs_table; - struct pxa_freqs *pxa_freq_settings; + const struct pxa_freqs *pxa_freq_settings; unsigned long flags; unsigned int new_freq_cpu, new_freq_mem; unsigned int unused, preset_mdrefr, postset_mdrefr, cclkcfg; @@ -361,7 +361,7 @@ static int pxa_cpufreq_init(struct cpufreq_policy *policy) int i; unsigned int freq; struct cpufreq_frequency_table *pxa255_freq_table; - struct pxa_freqs *pxa255_freqs; + const struct pxa_freqs *pxa255_freqs; /* try to guess pxa27x cpu */ if (cpu_is_pxa27x())