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 f88cd28fb5d9558add90dc7994c0e508f8c35221..10fac5451579a3ee55919747fc63370c09e20334 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 c2603bf92688665f121e0542a4d2d00bccaa42d0..6e7fc715ca3a1fa1db3538378b88b05838ee0059 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