From a9485e1c390125236fb5abb84fdd9bff0c0f67c6 Mon Sep 17 00:00:00 2001 From: Justin Pettit Date: Fri, 22 Aug 2008 13:21:58 -0700 Subject: [PATCH] Fix a couple of typos. --- datapath/datapath.c | 2 +- .../compat-2.4/include/linux/workqueue.h | 16 ++++++++++++---- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/datapath/datapath.c b/datapath/datapath.c index f88cd28f..10fac545 100644 --- a/datapath/datapath.c +++ b/datapath/datapath.c @@ -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(); diff --git a/datapath/linux-2.4/compat-2.4/include/linux/workqueue.h b/datapath/linux-2.4/compat-2.4/include/linux/workqueue.h index c2603bf9..6e7fc715 100644 --- a/datapath/linux-2.4/compat-2.4/include/linux/workqueue.h +++ b/datapath/linux-2.4/compat-2.4/include/linux/workqueue.h @@ -4,11 +4,19 @@ #include #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 -- 2.30.2