From 244ba85606b567e6e990d2fac61e3bde5ff8f0ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20Ter=C3=A4s?= Date: Wed, 15 Dec 2010 20:48:10 +0200 Subject: staging: hv: remove unneeded osd_schedule_callback MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit No one calls it anymore, so remove it. Reviewed-By: Hank Janssen Cc: Haiyang Zhang Signed-off-by: Timo Teräs Signed-off-by: Greg Kroah-Hartman --- drivers/staging/hv/osd.c | 34 ---------------------------------- drivers/staging/hv/osd.h | 4 ---- 2 files changed, 38 deletions(-) (limited to 'drivers/staging') diff --git a/drivers/staging/hv/osd.c b/drivers/staging/hv/osd.c index b699ee27f07f..b5a3940331b3 100644 --- a/drivers/staging/hv/osd.c +++ b/drivers/staging/hv/osd.c @@ -43,12 +43,6 @@ #include #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__ @@ -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); -} - diff --git a/drivers/staging/hv/osd.h b/drivers/staging/hv/osd.h index cae126ff6b9a..870ef0768833 100644 --- a/drivers/staging/hv/osd.h +++ b/drivers/staging/hv/osd.h @@ -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_ */ -- cgit v1.2.2