summaryrefslogtreecommitdiff
path: root/include/linux/devfreq.h
diff options
context:
space:
mode:
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>2023-05-08 10:42:15 +0300
committerChanwoo Choi <cw00.choi@samsung.com>2023-05-29 17:23:04 +0300
commit4a3a2c32a5ee163bc8f195b04751f165aa4d9c83 (patch)
treed4960b630a90152ae4813e125ee18cafc7071542 /include/linux/devfreq.h
parent7877cb91f1081754a1487c144d85dc0d2e2e7fc4 (diff)
downloadlinux-4a3a2c32a5ee163bc8f195b04751f165aa4d9c83.tar.xz
PM / devfreq: Reorder fields in 'struct devfreq_dev_status'
Group some variables based on their sizes to reduce holes. On x86_64, this shrinks the size of 'struct devfreq_dev_status' from 72 to 64 bytes. This structure is used both to allocate static variables or is embedded in some other structures. In both cases, reducing its size is nice to have. Moreover, the whole structure now fits in a single cache line on x86_64. Finally, it makes the order of code match the order of the above kernel doc. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Acked-by: MyungJoo Ham <myungjoo.ham@samsung.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Diffstat (limited to 'include/linux/devfreq.h')
-rw-r--r--include/linux/devfreq.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/devfreq.h b/include/linux/devfreq.h
index 7fd704bb8f3d..d312ffbac4dd 100644
--- a/include/linux/devfreq.h
+++ b/include/linux/devfreq.h
@@ -108,7 +108,6 @@ struct devfreq_dev_profile {
unsigned long initial_freq;
unsigned int polling_ms;
enum devfreq_timer timer;
- bool is_cooling_device;
int (*target)(struct device *dev, unsigned long *freq, u32 flags);
int (*get_dev_status)(struct device *dev,
@@ -118,6 +117,8 @@ struct devfreq_dev_profile {
unsigned long *freq_table;
unsigned int max_state;
+
+ bool is_cooling_device;
};
/**