Skip to content

Commit f75b0af

Browse files
chanwoochoimyungjoo
authored andcommitted
PM / devfreq: Move private devfreq_update_stats() into devfreq
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 <[email protected]> Signed-off-by: MyungJoo Ham <[email protected]>
1 parent e8305d4 commit f75b0af

File tree

2 files changed

+4
-13
lines changed

2 files changed

+4
-13
lines changed

drivers/devfreq/governor.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,8 @@ extern int devfreq_remove_governor(struct devfreq_governor *governor);
6969

7070
extern int devfreq_update_status(struct devfreq *devfreq, unsigned long freq);
7171

72+
static inline int devfreq_update_stats(struct devfreq *df)
73+
{
74+
return df->profile->get_dev_status(df->dev.parent, &df->last_status);
75+
}
7276
#endif /* _GOVERNOR_H */

include/linux/devfreq.h

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -214,19 +214,6 @@ extern void devm_devfreq_unregister_notifier(struct device *dev,
214214
extern struct devfreq *devfreq_get_devfreq_by_phandle(struct device *dev,
215215
int index);
216216

217-
/**
218-
* devfreq_update_stats() - update the last_status pointer in struct devfreq
219-
* @df: the devfreq instance whose status needs updating
220-
*
221-
* Governors are recommended to use this function along with last_status,
222-
* which allows other entities to reuse the last_status without affecting
223-
* the values fetched later by governors.
224-
*/
225-
static inline int devfreq_update_stats(struct devfreq *df)
226-
{
227-
return df->profile->get_dev_status(df->dev.parent, &df->last_status);
228-
}
229-
230217
#if IS_ENABLED(CONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND)
231218
/**
232219
* struct devfreq_simple_ondemand_data - void *data fed to struct devfreq

0 commit comments

Comments
 (0)