Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

windfarm: remove three exported but unused functions

wf_find_control(), wf_find_sensor(), and wf_is_overtemp() are exported
but unused. Remove these three functions.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>

authored by

Paul Bolle and committed by
Michael Ellerman
a368c29c ca94bbab

-46
-4
drivers/macintosh/windfarm.h
··· 53 53 * the kref and wf_unregister_control will decrement it, thus the 54 54 * object creating/disposing a given control shouldn't assume it 55 55 * still exists after wf_unregister_control has been called. 56 - * wf_find_control will inc the refcount for you 57 56 */ 58 57 extern int wf_register_control(struct wf_control *ct); 59 58 extern void wf_unregister_control(struct wf_control *ct); 60 - extern struct wf_control * wf_find_control(const char *name); 61 59 extern int wf_get_control(struct wf_control *ct); 62 60 extern void wf_put_control(struct wf_control *ct); 63 61 ··· 115 117 /* Same lifetime rules as controls */ 116 118 extern int wf_register_sensor(struct wf_sensor *sr); 117 119 extern void wf_unregister_sensor(struct wf_sensor *sr); 118 - extern struct wf_sensor * wf_find_sensor(const char *name); 119 120 extern int wf_get_sensor(struct wf_sensor *sr); 120 121 extern void wf_put_sensor(struct wf_sensor *sr); 121 122 ··· 141 144 /* Overtemp conditions. Those are refcounted */ 142 145 extern void wf_set_overtemp(void); 143 146 extern void wf_clear_overtemp(void); 144 - extern int wf_is_overtemp(void); 145 147 146 148 #define WF_EVENT_NEW_CONTROL 0 /* param is wf_control * */ 147 149 #define WF_EVENT_NEW_SENSOR 1 /* param is wf_sensor * */
-42
drivers/macintosh/windfarm_core.c
··· 254 254 } 255 255 EXPORT_SYMBOL_GPL(wf_unregister_control); 256 256 257 - struct wf_control * wf_find_control(const char *name) 258 - { 259 - struct wf_control *ct; 260 - 261 - mutex_lock(&wf_lock); 262 - list_for_each_entry(ct, &wf_controls, link) { 263 - if (!strcmp(ct->name, name)) { 264 - if (wf_get_control(ct)) 265 - ct = NULL; 266 - mutex_unlock(&wf_lock); 267 - return ct; 268 - } 269 - } 270 - mutex_unlock(&wf_lock); 271 - return NULL; 272 - } 273 - EXPORT_SYMBOL_GPL(wf_find_control); 274 - 275 257 int wf_get_control(struct wf_control *ct) 276 258 { 277 259 if (!try_module_get(ct->ops->owner)) ··· 349 367 } 350 368 EXPORT_SYMBOL_GPL(wf_unregister_sensor); 351 369 352 - struct wf_sensor * wf_find_sensor(const char *name) 353 - { 354 - struct wf_sensor *sr; 355 - 356 - mutex_lock(&wf_lock); 357 - list_for_each_entry(sr, &wf_sensors, link) { 358 - if (!strcmp(sr->name, name)) { 359 - if (wf_get_sensor(sr)) 360 - sr = NULL; 361 - mutex_unlock(&wf_lock); 362 - return sr; 363 - } 364 - } 365 - mutex_unlock(&wf_lock); 366 - return NULL; 367 - } 368 - EXPORT_SYMBOL_GPL(wf_find_sensor); 369 - 370 370 int wf_get_sensor(struct wf_sensor *sr) 371 371 { 372 372 if (!try_module_get(sr->ops->owner)) ··· 436 472 mutex_unlock(&wf_lock); 437 473 } 438 474 EXPORT_SYMBOL_GPL(wf_clear_overtemp); 439 - 440 - int wf_is_overtemp(void) 441 - { 442 - return (wf_overtemp != 0); 443 - } 444 - EXPORT_SYMBOL_GPL(wf_is_overtemp); 445 475 446 476 static int __init windfarm_core_init(void) 447 477 {