From patchwork Thu Aug 24 01:42:50 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chanwoo Choi X-Patchwork-Id: 9918841 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 0740E603FA for ; Thu, 24 Aug 2017 01:43:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EDA9E28ADA for ; Thu, 24 Aug 2017 01:43:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E29E728AE2; Thu, 24 Aug 2017 01:43:44 +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=-6.9 required=2.0 tests=BAYES_00,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 7D29028ADB for ; Thu, 24 Aug 2017 01:43:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751171AbdHXBnG (ORCPT ); Wed, 23 Aug 2017 21:43:06 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:29200 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751102AbdHXBnB (ORCPT ); Wed, 23 Aug 2017 21:43:01 -0400 Received: from epcas1p2.samsung.com (unknown [182.195.41.46]) by mailout3.samsung.com (KnoxPortal) with ESMTP id 20170824014300epoutp0310d1d58850c80d6e5fb9658967082859~dpLyFSY661300213002epoutp03m; Thu, 24 Aug 2017 01:43:00 +0000 (GMT) Received: from epsmges2p1.samsung.com (unknown [182.195.40.67]) by epcas1p2.samsung.com (KnoxPortal) with ESMTP id 20170824014259epcas1p25a8fd7a873de3ee9c5d00386621f03e2~dpLxztfon3009630096epcas1p2P; Thu, 24 Aug 2017 01:42:59 +0000 (GMT) Received: from epcas2p2.samsung.com ( [182.195.41.54]) by epsmges2p1.samsung.com (Symantec Messaging Gateway) with SMTP id FD.FF.10950.32F2E995; Thu, 24 Aug 2017 10:42:59 +0900 (KST) Received: from epsmgms2p2new.samsung.com (unknown [182.195.42.143]) by epcas2p1.samsung.com (KnoxPortal) with ESMTP id 20170824014259epcas2p174f90081b192ae5239f0130413ba3845~dpLxbsNWo2857528575epcas2p1M; Thu, 24 Aug 2017 01:42:59 +0000 (GMT) X-AuditID: b6c32a45-f79466d000002ac6-36-599e2f23f158 Received: from epmmp2 ( [203.254.227.17]) by epsmgms2p2new.samsung.com (Symantec Messaging Gateway) with SMTP id 4B.38.10338.32F2E995; Thu, 24 Aug 2017 10:42:59 +0900 (KST) Received: from localhost.localdomain ([10.113.62.212]) by mmp2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OV600BON23MQ710@mmp2.samsung.com>; Thu, 24 Aug 2017 10:42:59 +0900 (KST) From: Chanwoo Choi To: myungjoo.ham@samsung.com, kyungmin.park@samsung.com, cw00.choi@samsung.com Cc: rafael.j.wysocki@intel.com, chanwoo@kernel.org, inki.dae@samsung.com, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Chanwoo Choi Subject: [PATCH 03/12] PM / devfreq: Move private devfreq_update_stats() into devfreq Date: Thu, 24 Aug 2017 10:42:50 +0900 Message-id: <1503538979-22693-4-git-send-email-cw00.choi@samsung.com> X-Mailer: git-send-email 1.8.0 In-reply-to: <1503538979-22693-1-git-send-email-cw00.choi@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrPKsWRmVeSWpSXmKPExsWy7bCmma6y/rxIgyXLTCwm3rjCYnH9y3NW i2dHtS0m3Z/AYnG26Q27xeVdc9gsPvceYbS43biC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pweO2fdZfdYvOclk8emVZ1s Hn1bVjF6fN4kF8AaxWWTkpqTWZZapG+XwJXRv3EVW8E+/ooZ//ezNzBO5O1i5OSQEDCReP2t kbmLkYtDSGAdo8S6d9/ZIJwfjBI7jq9jB6liE9CS2P/iBhuILSLgJ7F9/npGkCJmgeWMEs8e 32HpYuTgEBYIl1i1QhCkhkVAVeLF9dusIDavgKvEuU2XWCG2yUl82PMIbCangJtEy9MuFhBb CKhmT99RxgmMPAsYGVYxSqYWFOem5xYbFRjlpZbrFSfmFpfmpesl5+duYgQG1rbDWv07GB8v iT/EKMDBqMTDe2Hh3Egh1sSy4srcQ4wSHMxKIrx71edFCvGmJFZWpRblxxeV5qQWH2KU5mBR EufN7JsRKSSQnliSmp2aWpBaBJNl4uCUamDMX16410La43THxQPV9uertn1vVvo5zXdT2/zT zVb7Dqvuv+M7+9cvpuTmyh//8/MeFghvljT7c8HkBbdpUFLTs63+RXLlG5x3u2wPShLZ+0PD U/1hm+2B3coBe9RKfyyN8njuorBu21rFjre3xRb+XcMbLX0tT+S+V/iFQ8I1Mw56C0psWB+q xFKckWioxVxUnAgAbAWFdigCAAA= X-CMS-MailID: 20170824014259epcas2p174f90081b192ae5239f0130413ba3845 X-Msg-Generator: CA X-Sender-IP: 182.195.42.143 X-Local-Sender: =?UTF-8?B?7LWc7LCs7JqwG1RpemVuIFBsYXRmb3JtIExhYihTL1fshLw=?= =?UTF-8?B?7YSwKRvsgrzshLHsoITsnpAbU2VuaW9yIEVuZ2luZWVy?= X-Global-Sender: =?UTF-8?B?Q2hhbndvbyBDaG9pG1RpemVuIFBsYXRmb3JtIExhYi4bU2Ft?= =?UTF-8?B?c3VuZyBFbGVjdHJvbmljcxtTZW5pb3IgRW5naW5lZXI=?= X-Sender-Code: =?UTF-8?B?QzEwG1RFTEUbQzEwVjgxMTE=?= CMS-TYPE: 102P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20170824014259epcas2p174f90081b192ae5239f0130413ba3845 X-RootMTR: 20170824014259epcas2p174f90081b192ae5239f0130413ba3845 References: <1503538979-22693-1-git-send-email-cw00.choi@samsung.com> 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 From: Chanwoo Choi THe devfreq_update_stats() updates the 'struct devfreq_dev_status' in order to get current status of devfreq device. It is only used for the governors. This patch moves the devfreq_update_stats() into devfreq directory. Signed-off-by: Chanwoo Choi Acked-by: MyungJoo Ham --- drivers/devfreq/governor.h | 4 ++++ include/linux/devfreq.h | 13 ------------- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/drivers/devfreq/governor.h b/drivers/devfreq/governor.h index a4f2fa1091e4..cfc50a61a90d 100644 --- a/drivers/devfreq/governor.h +++ b/drivers/devfreq/governor.h @@ -69,4 +69,8 @@ extern void devfreq_interval_update(struct devfreq *devfreq, extern int devfreq_update_status(struct devfreq *devfreq, unsigned long freq); +static inline int devfreq_update_stats(struct devfreq *df) +{ + return df->profile->get_dev_status(df->dev.parent, &df->last_status); +} #endif /* _GOVERNOR_H */ diff --git a/include/linux/devfreq.h b/include/linux/devfreq.h index 6c220e4ebb6b..597294e0cc40 100644 --- a/include/linux/devfreq.h +++ b/include/linux/devfreq.h @@ -214,19 +214,6 @@ extern void devm_devfreq_unregister_notifier(struct device *dev, extern struct devfreq *devfreq_get_devfreq_by_phandle(struct device *dev, int index); -/** - * devfreq_update_stats() - update the last_status pointer in struct devfreq - * @df: the devfreq instance whose status needs updating - * - * Governors are recommended to use this function along with last_status, - * which allows other entities to reuse the last_status without affecting - * the values fetched later by governors. - */ -static inline int devfreq_update_stats(struct devfreq *df) -{ - return df->profile->get_dev_status(df->dev.parent, &df->last_status); -} - #if IS_ENABLED(CONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND) /** * struct devfreq_simple_ondemand_data - void *data fed to struct devfreq