From patchwork Thu Jun 21 01:52:33 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Kaehlcke X-Patchwork-Id: 10478969 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 25363601D7 for ; Thu, 21 Jun 2018 01:54:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1457E28A56 for ; Thu, 21 Jun 2018 01:54:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0459928A5E; Thu, 21 Jun 2018 01:54:09 +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.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, 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 9D2A028A56 for ; Thu, 21 Jun 2018 01:54:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754513AbeFUBxL (ORCPT ); Wed, 20 Jun 2018 21:53:11 -0400 Received: from mail-pg0-f68.google.com ([74.125.83.68]:42361 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754512AbeFUBxG (ORCPT ); Wed, 20 Jun 2018 21:53:06 -0400 Received: by mail-pg0-f68.google.com with SMTP id c10-v6so637950pgu.9 for ; Wed, 20 Jun 2018 18:53:05 -0700 (PDT) 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; bh=PHqGB1KWmXG8tCPBzzeKxwdK3wpixqoJlVtQHpiPhAs=; b=ClZVkwfzHg6wSlvwrg7FQA759AkssUT0MLKBV5urMKrY9iz381ofVdmx4OMtJoeOIL NjPfj/AQrsfo9kT7bIBn4ruJLuRTZM6SgihmRxkuLU4uZamDl4+QLf2xQnPOJ8YUzEOz lgMwKmRwANfsacH4Th2LoO7+IRaSJo1AnHHbyubmVsMAWlyVmf5VifPjajOd3qK713yZ a5DlvpLqu4izLcp/TEZ6NDBC2ojMX+8zZiIzPK0wVtk/jKU5FPWHu+rXaCztkwxkXqGi spInyGKfDY8+L6RpDF1ukMjzaiG4X5HaDXQjLUTJLmXJV5z3D54wWdUcDD6ofEU1bAKM ipJQ== X-Gm-Message-State: APt69E1dWHL+QIO8GmYKUn7ANhzpXVFV9c8Ea1ZQfyDGHJg4zH5FnA// 9litDlquNfoboveZtXwYW1RUBQ== X-Google-Smtp-Source: ADUXVKLKgIl2otPeamWlZeHla/fI4O2g81O2+bonDgSOrtj9o/CfBNGkOVYTttMTTljUAlQdYk9efg== X-Received: by 2002:a62:4359:: with SMTP id q86-v6mr4060181pfa.140.1529545985103; Wed, 20 Jun 2018 18:53:05 -0700 (PDT) Received: from mka.mtv.corp.google.com ([2620:0:1000:1501:8e2d:4727:1211:622]) by smtp.gmail.com with ESMTPSA id p12-v6sm6585877pfi.175.2018.06.20.18.53.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 Jun 2018 18:53:04 -0700 (PDT) From: Matthias Kaehlcke To: MyungJoo Ham Cc: Kyungmin Park , Chanwoo Choi , Arnd Bergmann , Greg Kroah-Hartman , Rob Herring , Mark Rutland , linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Brian Norris , Douglas Anderson , Enric Balletbo i Serra , "Rafael J . Wysocki" , Viresh Kumar , Lee Jones , Benson Leung , Olof Johansson , Matthias Kaehlcke Subject: [PATCH v4 08/12] cpufreq: Add stub for cpufreq_update_policy() Date: Wed, 20 Jun 2018 18:52:33 -0700 Message-Id: <20180621015237.100100-9-mka@chromium.org> X-Mailer: git-send-email 2.18.0.rc2.346.g013aa6912e-goog In-Reply-To: <20180621015237.100100-1-mka@chromium.org> References: <20180621015237.100100-1-mka@chromium.org> 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 cpufreq stubs out some functions when CONFIG_CPU_FREQ=n , but cpufreq_update_policy() is not among them. The throttler driver (https://patchwork.kernel.org/patch/10453351/) uses cpufreq as one possible throttling mechanism, but it can still be useful without cpufreq. Stubbing out cpufreq_update_policy() allows the throttler driver to be built without ugly #ifdef'ery when cpufreq is disabled. Signed-off-by: Matthias Kaehlcke Reviewed-by: Brian Norris --- Changes in v4: - added 'Reviewed-by: Brian Norris ' tag Changes in v3: - patch added to series --- include/linux/cpufreq.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index 882a9b9e34bc..dba8c4951e2e 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h @@ -210,6 +210,7 @@ static inline unsigned int cpufreq_quick_get_max(unsigned int cpu) return 0; } static inline void disable_cpufreq(void) { } +static inline void cpufreq_update_policy(unsigned int cpu) { } #endif #ifdef CONFIG_CPU_FREQ_STAT