diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2012-07-03 19:07:21 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rjw@sisk.pl> | 2012-07-03 19:07:21 +0200 |
commit | e3b8cdd8e4ea51e46d3ff54d7e3568afc24654ec (patch) | |
tree | 0acfb0801d94d7222a752c40fb611dff00280803 /include | |
parent | 80de3d7f416f1accd03f2e519ead32d6fde4fcf4 (diff) | |
parent | 6e797a078824b30afbfae6cc4b1c2b21c51761ef (diff) | |
download | blackbird-op-linux-e3b8cdd8e4ea51e46d3ff54d7e3568afc24654ec.tar.gz blackbird-op-linux-e3b8cdd8e4ea51e46d3ff54d7e3568afc24654ec.zip |
Merge branch 'pm-cpuidle' into pm-domains
* pm-cpuidle:
PM / cpuidle: Add driver reference counter
cpuidle: move field disable from per-driver to per-cpu
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/cpuidle.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/include/linux/cpuidle.h b/include/linux/cpuidle.h index 6c26a3da0e03..27cfced7b57b 100644 --- a/include/linux/cpuidle.h +++ b/include/linux/cpuidle.h @@ -34,6 +34,7 @@ struct cpuidle_driver; struct cpuidle_state_usage { void *driver_data; + unsigned long long disable; unsigned long long usage; unsigned long long time; /* in US */ }; @@ -46,7 +47,6 @@ struct cpuidle_state { unsigned int exit_latency; /* in US */ int power_usage; /* in mW */ unsigned int target_residency; /* in US */ - unsigned int disable; int (*enter) (struct cpuidle_device *dev, struct cpuidle_driver *drv, @@ -136,7 +136,9 @@ struct cpuidle_driver { extern void disable_cpuidle(void); extern int cpuidle_idle_call(void); extern int cpuidle_register_driver(struct cpuidle_driver *drv); -struct cpuidle_driver *cpuidle_get_driver(void); +extern struct cpuidle_driver *cpuidle_get_driver(void); +extern struct cpuidle_driver *cpuidle_driver_ref(void); +extern void cpuidle_driver_unref(void); extern void cpuidle_unregister_driver(struct cpuidle_driver *drv); extern int cpuidle_register_device(struct cpuidle_device *dev); extern void cpuidle_unregister_device(struct cpuidle_device *dev); @@ -157,6 +159,8 @@ static inline int cpuidle_idle_call(void) { return -ENODEV; } static inline int cpuidle_register_driver(struct cpuidle_driver *drv) {return -ENODEV; } static inline struct cpuidle_driver *cpuidle_get_driver(void) {return NULL; } +static inline struct cpuidle_driver *cpuidle_driver_ref(void) {return NULL; } +static inline void cpuidle_driver_unref(void) {} static inline void cpuidle_unregister_driver(struct cpuidle_driver *drv) { } static inline int cpuidle_register_device(struct cpuidle_device *dev) {return -ENODEV; } |