Skip to content

Commit

Permalink
windfarm: remove three exported but unused functions
Browse files Browse the repository at this point in the history
wf_find_control(), wf_find_sensor(), and wf_is_overtemp() are exported
but unused. Remove these three functions.

Signed-off-by: Paul Bolle <[email protected]>
Signed-off-by: Michael Ellerman <[email protected]>
  • Loading branch information
pebolle authored and mpe committed Aug 6, 2015
1 parent ca94bba commit a368c29
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 46 deletions.
4 changes: 0 additions & 4 deletions drivers/macintosh/windfarm.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,9 @@ struct wf_control {
* the kref and wf_unregister_control will decrement it, thus the
* object creating/disposing a given control shouldn't assume it
* still exists after wf_unregister_control has been called.
* wf_find_control will inc the refcount for you
*/
extern int wf_register_control(struct wf_control *ct);
extern void wf_unregister_control(struct wf_control *ct);
extern struct wf_control * wf_find_control(const char *name);
extern int wf_get_control(struct wf_control *ct);
extern void wf_put_control(struct wf_control *ct);

Expand Down Expand Up @@ -117,7 +115,6 @@ struct wf_sensor {
/* Same lifetime rules as controls */
extern int wf_register_sensor(struct wf_sensor *sr);
extern void wf_unregister_sensor(struct wf_sensor *sr);
extern struct wf_sensor * wf_find_sensor(const char *name);
extern int wf_get_sensor(struct wf_sensor *sr);
extern void wf_put_sensor(struct wf_sensor *sr);

Expand All @@ -144,7 +141,6 @@ extern int wf_unregister_client(struct notifier_block *nb);
/* Overtemp conditions. Those are refcounted */
extern void wf_set_overtemp(void);
extern void wf_clear_overtemp(void);
extern int wf_is_overtemp(void);

#define WF_EVENT_NEW_CONTROL 0 /* param is wf_control * */
#define WF_EVENT_NEW_SENSOR 1 /* param is wf_sensor * */
Expand Down
42 changes: 0 additions & 42 deletions drivers/macintosh/windfarm_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -254,24 +254,6 @@ void wf_unregister_control(struct wf_control *ct)
}
EXPORT_SYMBOL_GPL(wf_unregister_control);

struct wf_control * wf_find_control(const char *name)
{
struct wf_control *ct;

mutex_lock(&wf_lock);
list_for_each_entry(ct, &wf_controls, link) {
if (!strcmp(ct->name, name)) {
if (wf_get_control(ct))
ct = NULL;
mutex_unlock(&wf_lock);
return ct;
}
}
mutex_unlock(&wf_lock);
return NULL;
}
EXPORT_SYMBOL_GPL(wf_find_control);

int wf_get_control(struct wf_control *ct)
{
if (!try_module_get(ct->ops->owner))
Expand Down Expand Up @@ -367,24 +349,6 @@ void wf_unregister_sensor(struct wf_sensor *sr)
}
EXPORT_SYMBOL_GPL(wf_unregister_sensor);

struct wf_sensor * wf_find_sensor(const char *name)
{
struct wf_sensor *sr;

mutex_lock(&wf_lock);
list_for_each_entry(sr, &wf_sensors, link) {
if (!strcmp(sr->name, name)) {
if (wf_get_sensor(sr))
sr = NULL;
mutex_unlock(&wf_lock);
return sr;
}
}
mutex_unlock(&wf_lock);
return NULL;
}
EXPORT_SYMBOL_GPL(wf_find_sensor);

int wf_get_sensor(struct wf_sensor *sr)
{
if (!try_module_get(sr->ops->owner))
Expand Down Expand Up @@ -473,12 +437,6 @@ void wf_clear_overtemp(void)
}
EXPORT_SYMBOL_GPL(wf_clear_overtemp);

int wf_is_overtemp(void)
{
return (wf_overtemp != 0);
}
EXPORT_SYMBOL_GPL(wf_is_overtemp);

static int __init windfarm_core_init(void)
{
DBG("wf: core loaded\n");
Expand Down

0 comments on commit a368c29

Please sign in to comment.