Skip to content

Commit

Permalink
staging: hv: remove unneeded osd_schedule_callback
Browse files Browse the repository at this point in the history
No one calls it anymore, so remove it.

Reviewed-By: Hank Janssen <[email protected]>
Cc: Haiyang Zhang <[email protected]>
Signed-off-by: Timo Teräs <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
fabled authored and gregkh committed Dec 16, 2010
1 parent 4b2f9ab commit 244ba85
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 38 deletions.
34 changes: 0 additions & 34 deletions drivers/staging/hv/osd.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,6 @@
#include <linux/slab.h>
#include "osd.h"

struct osd_callback_struct {
struct work_struct work;
void (*callback)(void *);
void *data;
};

void *osd_virtual_alloc_exec(unsigned int size)
{
#ifdef __x86_64__
Expand Down Expand Up @@ -198,31 +192,3 @@ int osd_waitevent_waitex(struct osd_waitevent *wait_event, u32 timeout_in_ms)
return ret;
}
EXPORT_SYMBOL_GPL(osd_waitevent_waitex);

static void osd_callback_work(struct work_struct *work)
{
struct osd_callback_struct *cb = container_of(work,
struct osd_callback_struct,
work);
(cb->callback)(cb->data);
kfree(cb);
}

int osd_schedule_callback(struct workqueue_struct *wq,
void (*func)(void *),
void *data)
{
struct osd_callback_struct *cb;

cb = kmalloc(sizeof(*cb), GFP_KERNEL);
if (!cb) {
printk(KERN_ERR "unable to allocate memory in osd_schedule_callback\n");
return -1;
}

cb->callback = func;
cb->data = data;
INIT_WORK(&cb->work, osd_callback_work);
return queue_work(wq, &cb->work);
}

4 changes: 0 additions & 4 deletions drivers/staging/hv/osd.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,4 @@ extern int osd_waitevent_wait(struct osd_waitevent *wait_event);
extern int osd_waitevent_waitex(struct osd_waitevent *wait_event,
u32 timeout_in_ms);

int osd_schedule_callback(struct workqueue_struct *wq,
void (*func)(void *),
void *data);

#endif /* _OSD_H_ */

0 comments on commit 244ba85

Please sign in to comment.