Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

[PATCH] m68knommu: fix work queues in mcfserial.c driver

Fix work queue code to support new model.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Greg Ungerer and committed by
Linus Torvalds
28580df0 ebfcfef4

+14 -19
+14 -19
drivers/serial/mcfserial.c
··· 425 425 * ------------------------------------------------------------------- 426 426 */ 427 427 428 - static void mcfrs_offintr(void *private) 428 + static void mcfrs_offintr(struct work_struct *work) 429 429 { 430 - struct mcf_serial *info = (struct mcf_serial *) private; 431 - struct tty_struct *tty; 430 + struct mcf_serial *info = container_of(work, struct mcf_serial, tqueue); 431 + struct tty_struct *tty = info->tty; 432 432 433 - tty = info->tty; 434 - if (!tty) 435 - return; 436 - tty_wakeup(tty); 433 + if (tty) 434 + tty_wakeup(tty); 437 435 } 438 436 439 437 ··· 495 497 * do_serial_hangup() -> tty->hangup() -> mcfrs_hangup() 496 498 * 497 499 */ 498 - static void do_serial_hangup(void *private) 500 + static void do_serial_hangup(struct work_struct *work) 499 501 { 500 - struct mcf_serial *info = (struct mcf_serial *) private; 501 - struct tty_struct *tty; 502 + struct mcf_serial *info = container_of(work, struct mcf_serial, tqueue_hangup); 503 + struct tty_struct *tty = info->tty; 502 504 503 - tty = info->tty; 504 - if (!tty) 505 - return; 506 - 507 - tty_hangup(tty); 505 + if (tty) 506 + tty_hangup(tty); 508 507 } 509 508 510 509 static int startup(struct mcf_serial * info) ··· 852 857 #ifdef SERIAL_DEBUG_THROTTLE 853 858 char buf[64]; 854 859 855 - printk("throttle %s: %d....\n", _tty_name(tty, buf), 860 + printk("throttle %s: %d....\n", tty_name(tty, buf), 856 861 tty->ldisc.chars_in_buffer(tty)); 857 862 #endif 858 863 ··· 871 876 #ifdef SERIAL_DEBUG_THROTTLE 872 877 char buf[64]; 873 878 874 - printk("unthrottle %s: %d....\n", _tty_name(tty, buf), 879 + printk("unthrottle %s: %d....\n", tty_name(tty, buf), 875 880 tty->ldisc.chars_in_buffer(tty)); 876 881 #endif 877 882 ··· 1785 1790 info->event = 0; 1786 1791 info->count = 0; 1787 1792 info->blocked_open = 0; 1788 - INIT_WORK(&info->tqueue, mcfrs_offintr, info); 1789 - INIT_WORK(&info->tqueue_hangup, do_serial_hangup, info); 1793 + INIT_WORK(&info->tqueue, mcfrs_offintr); 1794 + INIT_WORK(&info->tqueue_hangup, do_serial_hangup); 1790 1795 init_waitqueue_head(&info->open_wait); 1791 1796 init_waitqueue_head(&info->close_wait); 1792 1797