staging: hv: remove unneeded osd_schedule_callback
authorTimo Teräs <timo.teras@iki.fi>
Wed, 15 Dec 2010 18:48:10 +0000 (20:48 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 16 Dec 2010 20:35:15 +0000 (12:35 -0800)
No one calls it anymore, so remove it.

Reviewed-By: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Timo Teräs <timo.teras@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/hv/osd.c
drivers/staging/hv/osd.h

index b699ee27f07f334882d32627ef5398ef67ce6a47..b5a3940331b3dad6191d6ad93d5ca9a5ec11be19 100644 (file)
 #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__
@@ -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);
-}
-
index cae126ff6b9a93afd055aec0113700883c4c87f3..870ef0768833d21420b8756d350bb0453fb0dd94 100644 (file)
@@ -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_ */