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();
#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