From patchwork Fri Sep 13 13:01:19 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 20187 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ye0-f198.google.com (mail-ye0-f198.google.com [209.85.213.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 9CD4820358 for ; Fri, 13 Sep 2013 13:18:47 +0000 (UTC) Received: by mail-ye0-f198.google.com with SMTP id m11sf1160987yen.1 for ; Fri, 13 Sep 2013 06:18:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:in-reply-to:references :x-original-sender:x-original-authentication-results:precedence :mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=TUaMk6itK/sxoviGnY6Rme/SeC6ok2Vp139aj/Saf20=; b=IdWBrjLpzMVHferON6mqZZSVd3X5Q8orRsSXTytutA3phj7TxUqYudvywpSoNZfxRz g3GWkRqgAkH0w664Vlbj+zAh3RlYc2FPmbdsk74mc19oBPbEKRgcfe4JDHFCwzWIsjhO 9L4XyoEFEZBIupP8AL6yk9JqNYn4HLGFr4D1Ib03tQLA3E/8ha+5LZ28u/DPq3lLMLgk t1aIQEsVpdltglWxGo9jcCHPqIvGmaZ0Jk+jMBG4Amnn0CZVvhbJdTlLr6P07o/dUfMM /XIb6qtNst3yMklUZenGLbfK2ZIvgxxxMK0ItDbRxgIInR0hiFZRdpAPUrn3j7W8cz0f iKwQ== X-Gm-Message-State: ALoCoQlN1vtjqhU/3jgCk7y9s/93Up0k8b0jq/vuApz3QjoACFnrfuwd7AO7Z80dYailIfkbmkid X-Received: by 10.236.110.168 with SMTP id u28mr4989615yhg.40.1379078327183; Fri, 13 Sep 2013 06:18:47 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.47.82 with SMTP id b18ls1133043qen.53.gmail; Fri, 13 Sep 2013 06:18:47 -0700 (PDT) X-Received: by 10.220.164.70 with SMTP id d6mr11809202vcy.19.1379078326981; Fri, 13 Sep 2013 06:18:46 -0700 (PDT) Received: from mail-vb0-f50.google.com (mail-vb0-f50.google.com [209.85.212.50]) by mx.google.com with ESMTPS id s17si3110015vcu.89.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:18:46 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.50 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.50; Received: by mail-vb0-f50.google.com with SMTP id x14so881342vbb.37 for ; Fri, 13 Sep 2013 06:18:46 -0700 (PDT) X-Received: by 10.58.208.130 with SMTP id me2mr11919357vec.13.1379078326855; Fri, 13 Sep 2013 06:18:46 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp80236vcz; Fri, 13 Sep 2013 06:18:46 -0700 (PDT) X-Received: by 10.66.169.172 with SMTP id af12mr15496384pac.23.1379078325789; Fri, 13 Sep 2013 06:18:45 -0700 (PDT) Received: from mail-pa0-f51.google.com (mail-pa0-f51.google.com [209.85.220.51]) by mx.google.com with ESMTPS id p8si2599451pbc.211.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:18:45 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.51 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.220.51; Received: by mail-pa0-f51.google.com with SMTP id lf1so2512258pab.24 for ; Fri, 13 Sep 2013 06:18:45 -0700 (PDT) X-Received: by 10.68.225.99 with SMTP id rj3mr13071121pbc.122.1379078325367; Fri, 13 Sep 2013 06:18:45 -0700 (PDT) Received: from localhost ([122.167.78.148]) by mx.google.com with ESMTPSA id sz3sm11744296pbc.5.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:18:44 -0700 (PDT) From: Viresh Kumar To: rjw@sisk.pl Cc: linaro-kernel@lists.linaro.org, patches@linaro.org, cpufreq@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Viresh Kumar Subject: [PATCH 133/228] cpufreq: exynos: use cpufreq_generic_init() routine Date: Fri, 13 Sep 2013 18:31:19 +0530 Message-Id: <8e311fb003cfc82e37e4a5717a92106a2ceb15f7.1379063063.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 1.7.12.rc2.18.g61b472e In-Reply-To: References: In-Reply-To: References: X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: viresh.kumar@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.50 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Use generic cpufreq_generic_init() routine instead of replicating the same code here. Signed-off-by: Viresh Kumar --- drivers/cpufreq/exynos-cpufreq.c | 7 +------ drivers/cpufreq/exynos5440-cpufreq.c | 14 ++------------ 2 files changed, 3 insertions(+), 18 deletions(-) diff --git a/drivers/cpufreq/exynos-cpufreq.c b/drivers/cpufreq/exynos-cpufreq.c index 5244086..b96fcc8 100644 --- a/drivers/cpufreq/exynos-cpufreq.c +++ b/drivers/cpufreq/exynos-cpufreq.c @@ -241,12 +241,7 @@ static struct notifier_block exynos_cpufreq_nb = { static int exynos_cpufreq_cpu_init(struct cpufreq_policy *policy) { - /* set the transition latency value */ - policy->cpuinfo.transition_latency = 100000; - - cpumask_setall(policy->cpus); - - return cpufreq_table_validate_and_show(policy, exynos_info->freq_table); + return cpufreq_generic_init(policy, exynos_info->freq_table, 100000); } static struct cpufreq_driver exynos_driver = { diff --git a/drivers/cpufreq/exynos5440-cpufreq.c b/drivers/cpufreq/exynos5440-cpufreq.c index a7d272b..e6fae7f 100644 --- a/drivers/cpufreq/exynos5440-cpufreq.c +++ b/drivers/cpufreq/exynos5440-cpufreq.c @@ -321,18 +321,8 @@ static void exynos_sort_descend_freq_table(void) static int exynos_cpufreq_cpu_init(struct cpufreq_policy *policy) { - int ret; - - ret = cpufreq_table_validate_and_show(policy, dvfs_info->freq_table); - if (ret) { - dev_err(dvfs_info->dev, "Invalid frequency table: %d\n", ret); - return ret; - } - - policy->cpuinfo.transition_latency = dvfs_info->latency; - cpumask_setall(policy->cpus); - - return 0; + return cpufreq_generic_init(policy, dvfs_info->freq_table, + dvfs_info->latency); } static struct cpufreq_driver exynos_driver = {