Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1718763
| From | Chanwoo Choi <cw00.choi@samsung.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 03/12] PM / devfreq: Move private devfreq_update_stats() into devfreq |
| Date | 2017-08-24 03:50 +0200 |
| Message-ID | <uhPrs-8ei-31@gated-at.bofh.it> (permalink) |
| References | <uhPrr-8ei-3@gated-at.bofh.it> <uhPrs-8ei-33@gated-at.bofh.it> <uhPrr-8ei-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Chanwoo Choi <cwchoi00@gmail.com>
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 <cwchoi00@gmail.com>
---
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
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH 03/12] PM / devfreq: Move private devfreq_update_stats() into devfreq Chanwoo Choi <cw00.choi@samsung.com> - 2017-08-24 03:50 +0200
csiph-web