Fix a couple of typos.
authorJustin Pettit <jpettit@nicira.com>
Fri, 22 Aug 2008 20:21:58 +0000 (13:21 -0700)
committerJustin Pettit <jpettit@nicira.com>
Fri, 22 Aug 2008 20:21:58 +0000 (13:21 -0700)
datapath/datapath.c
datapath/linux-2.4/compat-2.4/include/linux/workqueue.h

index f88cd28..10fac54 100644 (file)
@@ -407,7 +407,7 @@ int add_switch_port(struct datapath *dp, struct net_device *dev)
 static int del_switch_port(struct net_bridge_port *p)
 {
        /* First drop references to device. */
-       cancel_work_sync(p->work);
+       cancel_work_sync(&p->port_task);
        rtnl_lock();
        dev_set_promiscuity(p->dev, -1);
        rtnl_unlock();
index c2603bf..6e7fc71 100644 (file)
@@ -4,11 +4,19 @@
 #include <linux/tqueue.h>
 
 #define work_struct tq_struct
+
 #define INIT_WORK(_work, _routine) \
-       INIT_TQUEUE((_work), (_routine), (_work))
+       INIT_TQUEUE((_work), ((void *)_routine), (_work))
+
 #define PREPARE_WORK(_work, _routine)    \
-       PREPARE_TQUEUE((_work), (_routine), (_work))
-#define schedule_work schedule_task
-#define flush_scheduled_work flush_scheduled_tasks
+       PREPARE_TQUEUE((_work), ((void *)_routine), (_work))
+
+#define schedule_work(_work) schedule_task(_work)
+
+#define flush_scheduled_work() flush_scheduled_tasks()
+
+/* There is no equivalent to cancel_work_sync() in 2.4, so just flush all 
+ * pending tasks. */
+#define cancel_work_sync(_work) flush_scheduled_tasks()
 
 #endif