Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751276AbdHXBnJ (ORCPT ); Wed, 23 Aug 2017 21:43:09 -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 X-AuditID: b6c32a45-f79466d000002ac6-36-599e2f23f158 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/AYnG26Q27xeVdc9gsPvceYbS43biCzeLxirfsDpweO2fdZfdYvOclk8emVZ1s Hn1bVjF6fN4kF8AalWqTkZqYklqkkJqXnJ+SmZduq+QdHO8cb2pmYKhraGlhrqSQl5ibaqvk 4hOg65aZA3SPkkJZYk4pUCggsbhYSd/Opii/tCRVISO/uMRWKdrQ0EjP0MBcz8jISM/EONbK yBSoJCE1o3/jKraCffwVM/7vZ29gnMjbxcjJISFgInHl/mVWCFtM4sK99WwgtpDADkaJ1xPS uxi5gOzvjBLzj21lhGl4/a2RGaJoA6NEU1s4RNEPRokTEzaBFbEJaEnsf3EDbJKIQIBE59pV TCBFzALLGSXOtbxnAkkIC4RLzDoxGcxmEVCVeHH9NtgZvAKuEuc2XYI6SU7iw55H7C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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-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1927 Lines: 53 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 --- 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 -- 1.9.1