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
115115 struct cpuidle_driver {
116116 const char *name;
117117 struct module *owner;
118− int refcnt;
119118
120119 /* used by the cpuidle framework to setup the broadcast timer */
121120 unsigned int bctimer:1;
@@ -147,8 +146,6 @@ extern u64 cpuidle_poll_time(struct cpuidle_driver *drv, · 25 unmodified lines
147146
148147 extern int cpuidle_register_driver(struct cpuidle_driver *drv);
149148 extern struct cpuidle_driver *cpuidle_get_driver(void);
150−extern struct cpuidle_driver *cpuidle_driver_ref(void);
151−extern void cpuidle_driver_unref(void);
152149 extern void cpuidle_driver_state_disabled(struct cpuidle_driver *drv, int idx,
153150 bool disable);
154151 extern 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
186183 static inline int cpuidle_register_driver(struct cpuidle_driver *drv)
187184 {return -ENODEV; }
188185 static inline struct cpuidle_driver *cpuidle_get_driver(void) {return NULL; }
189−static inline struct cpuidle_driver *cpuidle_driver_ref(void) {return NULL; }
190−static inline void cpuidle_driver_unref(void) {}
191186 static inline void cpuidle_driver_state_disabled(struct cpuidle_driver *drv,
192187 int idx, bool disable) { }
193188 static inline void cpuidle_unregister_driver(struct cpuidle_driver *drv) { }