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