From patchwork Mon Feb 26 05:09:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 10241271 X-Patchwork-Delegate: rjw@sisk.pl Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2F0E260208 for ; Mon, 26 Feb 2018 05:10:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 20995292DF for ; Mon, 26 Feb 2018 05:10:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 159AA297C3; Mon, 26 Feb 2018 05:10:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B42FB292DF for ; Mon, 26 Feb 2018 05:10:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751175AbeBZFKY (ORCPT ); Mon, 26 Feb 2018 00:10:24 -0500 Received: from mail-pl0-f68.google.com ([209.85.160.68]:41469 "EHLO mail-pl0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751968AbeBZFKX (ORCPT ); Mon, 26 Feb 2018 00:10:23 -0500 Received: by mail-pl0-f68.google.com with SMTP id k8so8651353pli.8 for ; Sun, 25 Feb 2018 21:10:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=uexsEejaqILmf4ZtdkSAZqeKDu7niqeAJdapu8BF/q0=; b=SEW+mDBilzPlZr9ffiBWE/jkZ+E9WgTwi1oDYrXQTlmMOnl5JYoWA6sJkzeGBfbdtv YNj0JEmlWyhP/VwTfJR2qgOs/g9x+qV0Z3UAqupokMD/vpjI5Z8fY3NZ3332s9+De9mg hCjDxoICe+IWvf4ytMgFlAmd59j+UJmnsioro= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=uexsEejaqILmf4ZtdkSAZqeKDu7niqeAJdapu8BF/q0=; b=WWi/vZhxBgLJ8IP9fcbNB7+Xf1FvI0c+VGKsERkIIoAFA9ocIw0IcPYYYEclhm4X3X 2fZLZHsfWsxpwBHKof7bj+JqqMXYwg7gA6TfAQlNceJhDeMpEqobWjSn/Qo6wJNSFlWi GVSwBI6RpLyZy9Vl85Q5q6Vfhw3FR6fUIg3/AA7rHtwcdLE3ZBYMvOwMKL+KTTMyqkPR lkwnUYOctMBQZLvJviBaPLkL8QvkSfXrhPy5q/Z6PkBY8iV4/2kMTXcEFUZeLIfw+v/n wrb+RFpqXxu/UIgvDX7Bv4zfRYylhn2sI3phRkDgo93S4rmAmy5X9snGAQ6FxFhY2lSv Ydyw== X-Gm-Message-State: APf1xPDJAkBq60meOz6WcHnNGx5Qbd5ayki58qFlaWIWcONSidFombZN 4Do7RDSxqDUlcDVWI5qqPgsamBptqHU= X-Google-Smtp-Source: AH8x224F5KeBExRO2uAetlIIJ8F6H1YhDI9yBM9nvhW9YNkIvW0e6kCVBqQhMOliaZBVnN4UGUDViA== X-Received: by 2002:a17:902:128c:: with SMTP id g12-v6mr9442838pla.85.1519621822697; Sun, 25 Feb 2018 21:10:22 -0800 (PST) Received: from localhost ([122.172.92.38]) by smtp.gmail.com with ESMTPSA id j64sm17036982pfe.68.2018.02.25.21.10.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 25 Feb 2018 21:10:22 -0800 (PST) From: Viresh Kumar To: Rafael Wysocki Cc: Viresh Kumar , linux-pm@vger.kernel.org, Vincent Guittot Subject: [PATCH 20/27] cpufreq: sc520: Don't validate the frequency table twice Date: Mon, 26 Feb 2018 10:39:03 +0530 Message-Id: <9ba3ed6f58409704e1ac82d81c5eaf3cbd423f35.1519620578.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.15.0.194.g9af6a3dea062 In-Reply-To: References: In-Reply-To: References: Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The cpufreq core is already validating the CPU frequency table after calling the ->init() callback of the cpufreq drivers and the drivers don't need to do the same anymore. Though they need to set the policy->freq_table field directly from the ->init() callback now. Stop validating the frequency table from sc520 driver. Signed-off-by: Viresh Kumar --- drivers/cpufreq/sc520_freq.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/cpufreq/sc520_freq.c b/drivers/cpufreq/sc520_freq.c index 4225501a4b78..abaa75e86148 100644 --- a/drivers/cpufreq/sc520_freq.c +++ b/drivers/cpufreq/sc520_freq.c @@ -83,8 +83,9 @@ static int sc520_freq_cpu_init(struct cpufreq_policy *policy) /* cpuinfo and default policy values */ policy->cpuinfo.transition_latency = 1000000; /* 1ms */ + policy->freq_table = sc520_freq_table; - return cpufreq_table_validate_and_show(policy, sc520_freq_table); + return 0; }