Commit 244ba856 authored by Timo Teräs's avatar Timo Teräs Committed by Greg Kroah-Hartman

staging: hv: remove unneeded osd_schedule_callback

No one calls it anymore, so remove it.
Reviewed-By: default avatarHank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: default avatarTimo Teräs <timo.teras@iki.fi>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 4b2f9abe
...@@ -43,12 +43,6 @@ ...@@ -43,12 +43,6 @@
#include <linux/slab.h> #include <linux/slab.h>
#include "osd.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) void *osd_virtual_alloc_exec(unsigned int size)
{ {
#ifdef __x86_64__ #ifdef __x86_64__
...@@ -198,31 +192,3 @@ int osd_waitevent_waitex(struct osd_waitevent *wait_event, u32 timeout_in_ms) ...@@ -198,31 +192,3 @@ int osd_waitevent_waitex(struct osd_waitevent *wait_event, u32 timeout_in_ms)
return ret; return ret;
} }
EXPORT_SYMBOL_GPL(osd_waitevent_waitex); 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);
}
...@@ -63,8 +63,4 @@ extern int osd_waitevent_wait(struct osd_waitevent *wait_event); ...@@ -63,8 +63,4 @@ extern int osd_waitevent_wait(struct osd_waitevent *wait_event);
extern int osd_waitevent_waitex(struct osd_waitevent *wait_event, extern int osd_waitevent_waitex(struct osd_waitevent *wait_event,
u32 timeout_in_ms); u32 timeout_in_ms);
int osd_schedule_callback(struct workqueue_struct *wq,
void (*func)(void *),
void *data);
#endif /* _OSD_H_ */ #endif /* _OSD_H_ */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment