Skip to contentSkip to conversation

IrDA: Switching to a workqueue for the SIR work

PATCH Applied Samuel Ortiz 2 participants 2 messages May 8, 2006 – May 9, 2006

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 4/4 IrDA: Switching to a workqueue for the SIR work

Since sir_kthread.c pretty much duplicates the workqueue functionality, we'd better switch.
The SIR fsm has been merged into sir_dev.c and thus sir_kthread.c is deleted.

---

 drivers/net/irda/Makefile      |    2 
 drivers/net/irda/sir-dev.h     |   13 -
 drivers/net/irda/sir_dev.c     |  315 ++++++++++++++++++++++++-
 drivers/net/irda/sir_kthread.c |  508 ----------------------------------------
 4 files changed, 314 insertions(+), 524 deletions(-)
 delete mode 100644 drivers/net/irda/sir_kthread.c

f13ce8e0a66e2b576110a0d9b8b1b1906350feef

drivers/net/irda/Makefile +1 -1
index 27ab75f..c1ce239 100644
@@ -46,4 +46,4 @@ obj-$(CONFIG_MA600_DONGLE)	+= ma600-sir.
 obj-$(CONFIG_TOIM3232_DONGLE)	+= toim3232-sir.o
 
 # The SIR helper module
-sir-dev-objs := sir_dev.o sir_dongle.o sir_kthread.o
+sir-dev-objs := sir_dev.o sir_dongle.o
drivers/net/irda/sir-dev.h +2 -11
index f69fb4c..9fa294a 100644
@@ -15,23 +15,14 @@ #ifndef IRDA_SIR_H
 #define IRDA_SIR_H
 
 #include <linux/netdevice.h>
+#include <linux/workqueue.h>
 
 #include <net/irda/irda.h>
 #include <net/irda/irda_device.h>		// iobuff_t
 
-/* FIXME: unify irda_request with sir_fsm! */
-
-struct irda_request {
-	struct list_head lh_request;
-	unsigned long pending;
-	void (*func)(void *);
-	void *data;
-	struct timer_list timer;
-};
-
 struct sir_fsm {
 	struct semaphore	sem;
-	struct irda_request	rq;
+	struct work_struct      work;
 	unsigned		state, substate;
 	int			param;
 	int			result;
drivers/net/irda/sir_dev.c +311 -4

330 lines not on this page · raw message

drivers/net/irda/sir_kthread.c deleted +0 -508

508 lines not on this page · raw message

Signature · 1 line
1.3.1