History

cpuidle: Drop unused cpuidle_driver_ref/unref() functions

The cpuidle_driver_ref() and cpuidle_driver_unref() functions are not used and the refcnt field in struct cpuidle_driver operated by them is not updated anywhere else (so it is permanently equal to 0), so drop both of them along with refcnt.

Rafael J. Wysocki committed 6 years ago

Commit 577a2f41 parent 85c3ebd2 files · +0 −51Browse files

Showing the changes to include/linux (1 of 2 files). Show all

Unified · Split

include/linux/cpuidle.h+0−5
@@ -115,7 +115,6 @@ DECLARE_PER_CPU(struct cpuidle_device, cpuidle_dev); · 114 unmodified lines
115struct cpuidle_driver {115struct cpuidle_driver {
116 const char *name;116 const char *name;
117 struct module *owner;117 struct module *owner;
118 int refcnt;
119 118
120 /* used by the cpuidle framework to setup the broadcast timer */119 /* used by the cpuidle framework to setup the broadcast timer */
121 unsigned int bctimer:1;120 unsigned int bctimer:1;
@@ -147,8 +146,6 @@ extern u64 cpuidle_poll_time(struct cpuidle_driver *drv, · 25 unmodified lines
147 146
148extern int cpuidle_register_driver(struct cpuidle_driver *drv);147extern int cpuidle_register_driver(struct cpuidle_driver *drv);
149extern struct cpuidle_driver *cpuidle_get_driver(void);148extern struct cpuidle_driver *cpuidle_get_driver(void);
150extern struct cpuidle_driver *cpuidle_driver_ref(void);
151extern void cpuidle_driver_unref(void);
152extern void cpuidle_driver_state_disabled(struct cpuidle_driver *drv, int idx,149extern void cpuidle_driver_state_disabled(struct cpuidle_driver *drv, int idx,
153 bool disable);150 bool disable);
154extern void cpuidle_unregister_driver(struct cpuidle_driver *drv);151extern void cpuidle_unregister_driver(struct cpuidle_driver *drv);
@@ -186,8 +183,6 @@ static inline u64 cpuidle_poll_time(struct cpuidle_driver *drv, · 31 unmodified lines
186static inline int cpuidle_register_driver(struct cpuidle_driver *drv)183static inline int cpuidle_register_driver(struct cpuidle_driver *drv)
187{return -ENODEV; }184{return -ENODEV; }
188static inline struct cpuidle_driver *cpuidle_get_driver(void) {return NULL; }185static inline struct cpuidle_driver *cpuidle_get_driver(void) {return NULL; }
189static inline struct cpuidle_driver *cpuidle_driver_ref(void) {return NULL; }
190static inline void cpuidle_driver_unref(void) {}
191static inline void cpuidle_driver_state_disabled(struct cpuidle_driver *drv,186static inline void cpuidle_driver_state_disabled(struct cpuidle_driver *drv,
192 int idx, bool disable) { }187 int idx, bool disable) { }
193static inline void cpuidle_unregister_driver(struct cpuidle_driver *drv) { }188static inline void cpuidle_unregister_driver(struct cpuidle_driver *drv) { }