From patchwork Wed Aug 21 14:42:23 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 19380 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 6A219248E6 for ; Wed, 21 Aug 2013 14:43:13 +0000 (UTC) Received: by mail-ye0-f198.google.com with SMTP id m12sf448150yen.1 for ; Wed, 21 Aug 2013 07:43:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-gm-message-state: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=+Oguyt8B0B2fzuYcZ53REzJtAJwwNd9Xzf37+DLvsKs=; b=olB1ziiHmDYyF+fOvt6sOczsht0UiQG6tiqJdM5b/ySY2JlO41XNC7bYTEflvWdrZ5 FqVgb1wod4enht/A+CbK+NOYK1F0Hht/qypbvYAAbYqUN6x08f3qitaRwI6+o27IwNZO w3GdENQp8AZStWap0iQPGLekpVdtaYz1ALp32zxV4f4OKioQpFOeapxoTJlYl8wAciTy +NBOWRj3NZabhYNnT2V1IkORaBCWlQqptf4/Lm1Uc+Msu0uJDNmS49qHT12mDTPKMFFC GRQglDjrsLyKh1V54tG4nEGtPnbJgsYg+nPwohiFZHagXUbKJlJkYehA+IXHxLWPENrD aJ2w== X-Received: by 10.224.4.138 with SMTP id 10mr9687581qar.8.1377096193197; Wed, 21 Aug 2013 07:43:13 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.97.199 with SMTP id ec7ls690842qeb.26.gmail; Wed, 21 Aug 2013 07:43:13 -0700 (PDT) X-Received: by 10.52.173.71 with SMTP id bi7mr367984vdc.38.1377096193088; Wed, 21 Aug 2013 07:43:13 -0700 (PDT) Received: from mail-ve0-f182.google.com (mail-ve0-f182.google.com [209.85.128.182]) by mx.google.com with ESMTPS id fa1si2216994veb.82.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 21 Aug 2013 07:43:13 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.182 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.182; Received: by mail-ve0-f182.google.com with SMTP id m1so411269ves.41 for ; Wed, 21 Aug 2013 07:43:13 -0700 (PDT) X-Gm-Message-State: ALoCoQk/JL41nonsCXhYGzThh84tV0jZZWXadVoT3jBxru+dOjqzwzGGBDtLvXfk9jjjS5DEmNW+ X-Received: by 10.58.215.15 with SMTP id oe15mr2284610vec.25.1377096192998; Wed, 21 Aug 2013 07:43:12 -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 u4csp224548vcz; Wed, 21 Aug 2013 07:43:12 -0700 (PDT) X-Received: by 10.67.30.100 with SMTP id kd4mr10013028pad.24.1377096192223; Wed, 21 Aug 2013 07:43:12 -0700 (PDT) Received: from mail-pa0-f48.google.com (mail-pa0-f48.google.com [209.85.220.48]) by mx.google.com with ESMTPS id vs3si6677930pab.259.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 21 Aug 2013 07:43:12 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.48 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.220.48; Received: by mail-pa0-f48.google.com with SMTP id kp13so889024pab.35 for ; Wed, 21 Aug 2013 07:43:11 -0700 (PDT) X-Received: by 10.68.76.34 with SMTP id h2mr8075226pbw.20.1377096191812; Wed, 21 Aug 2013 07:43:11 -0700 (PDT) Received: from localhost ([122.172.193.46]) by mx.google.com with ESMTPSA id nv6sm8850163pbc.6.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 21 Aug 2013 07:43:11 -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, Viresh Kumar , Amit Daniel Kachhap , Kukjin Kim Subject: [PATCH 04/14] cpufreq: exynos: use cpufreq_generic_init() routine Date: Wed, 21 Aug 2013 20:12:23 +0530 Message-Id: <49fe6e3b9a14023e6a49f80fc0e6d87c02fca6cd.1377093938.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.128.182 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. Cc: Amit Daniel Kachhap Cc: Kukjin Kim 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 0f87a29..c9ae7e6 100644 --- a/drivers/cpufreq/exynos-cpufreq.c +++ b/drivers/cpufreq/exynos-cpufreq.c @@ -214,12 +214,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 b9673fa..68da5f4 100644 --- a/drivers/cpufreq/exynos5440-cpufreq.c +++ b/drivers/cpufreq/exynos5440-cpufreq.c @@ -308,18 +308,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 = {