mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [M68KNOMMU]: fix workqueues in 68328 serial driver
@ 2007-07-25 12:07 Greg Ungerer
  0 siblings, 0 replies; only message in thread
From: Greg Ungerer @ 2007-07-25 12:07 UTC (permalink / raw)
  To: torvalds; +Cc: gerg, linux-kernel

Fix workqueues in 68328 serial driver.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
---


diff -Naur linux-2.6.22/drivers/serial/68328serial.c linux-2.6.22-uc0/drivers/serial/68328serial.c
--- linux-2.6.22/drivers/serial/68328serial.c	2007-07-12 15:22:34.000000000 +1000
+++ linux-2.6.22-uc0/drivers/serial/68328serial.c	2007-07-12 15:25:25.000000000 +1000
@@ -401,9 +400,9 @@
 	return IRQ_HANDLED;
 }
 
-static void do_softint(void *private)
+static void do_softint(struct work_struct *work)
 {
-	struct m68k_serial	*info = (struct m68k_serial *) private;
+	struct m68k_serial	*info = container_of(work, struct m68k_serial, tqueue);
 	struct tty_struct	*tty;
 	
 	tty = info->tty;
@@ -425,9 +424,9 @@
  * 	do_serial_hangup() -> tty->hangup() -> rs_hangup()
  * 
  */
-static void do_serial_hangup(void *private)
+static void do_serial_hangup(struct work_struct *work)
 {
-	struct m68k_serial	*info = (struct m68k_serial *) private;
+	struct m68k_serial	*info = container_of(work, struct m68k_serial, tqueue_hangup);
 	struct tty_struct	*tty;
 	
 	tty = info->tty;
@@ -1444,8 +1390,8 @@
 	    info->event = 0;
 	    info->count = 0;
 	    info->blocked_open = 0;
-	    INIT_WORK(&info->tqueue, do_softint, info);
-	    INIT_WORK(&info->tqueue_hangup, do_serial_hangup, info);
+	    INIT_WORK(&info->tqueue, do_softint);
+	    INIT_WORK(&info->tqueue_hangup, do_serial_hangup);
 	    init_waitqueue_head(&info->open_wait);
 	    init_waitqueue_head(&info->close_wait);
 	    info->line = i;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-07-25 12:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-25 12:07 [M68KNOMMU]: fix workqueues in 68328 serial driver Greg Ungerer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®