Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b963a844 authored by Jiri Slaby's avatar Jiri Slaby Committed by Linus Torvalds
Browse files

[PATCH] Char: tty_wakeup cleanup



tty_wakeup cleanup

- remove wake_up_interruptible(&tty->write_wait) surrounding
  tty_wakup(tty);
- substitute tty->ldisc.write_wakeup(tty) + wake_up() by tty_wakeup(tty);

Signed-off-by: default avatarJiri Slaby <jirislaby@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Acked-by: default avatarTilman Schmidt <tilman@imap.cc>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 1ed0c0b7
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -527,10 +527,8 @@ static void do_softint(unsigned long private_)
	if (!tty)
		return;

	if (test_and_clear_bit(RS_EVENT_WRITE_WAKEUP, &info->event)) {
	if (test_and_clear_bit(RS_EVENT_WRITE_WAKEUP, &info->event))
		tty_wakeup(tty);
		wake_up_interruptible(&tty->write_wait);
	}
}

/*
@@ -968,7 +966,6 @@ static void rs_flush_buffer(struct tty_struct *tty)
	local_irq_save(flags);
	info->xmit.head = info->xmit.tail = 0;
	local_irq_restore(flags);
	wake_up_interruptible(&tty->write_wait);
	tty_wakeup(tty);
}

+0 −1
Original line number Diff line number Diff line
@@ -4488,7 +4488,6 @@ static void cy_flush_buffer(struct tty_struct *tty)
		CY_UNLOCK(info, flags);
	}
	tty_wakeup(tty);
	wake_up_interruptible(&tty->write_wait);
}				/* cy_flush_buffer */

/*
+0 −3
Original line number Diff line number Diff line
@@ -844,7 +844,6 @@ static void pc_flush_buffer(struct tty_struct *tty)
	fepcmd(ch, STOUT, (unsigned) tail, 0, 0, 0);
	memoff(ch);
	spin_unlock_irqrestore(&epca_lock, flags);
	wake_up_interruptible(&tty->write_wait);
	tty_wakeup(tty);
} /* End pc_flush_buffer */

@@ -1795,7 +1794,6 @@ static void doevent(int crd)
				{ /* Begin if LOWWAIT */
					ch->statusflags &= ~LOWWAIT;
					tty_wakeup(tty);
					wake_up_interruptible(&tty->write_wait);
				} /* End if LOWWAIT */
			} else if (event & EMPTYTX_IND)  { /* Begin EMPTYTX_IND */
				/* This event is generated by setup_empty_event */
@@ -1803,7 +1801,6 @@ static void doevent(int crd)
				if (ch->statusflags & EMPTYWAIT)  { /* Begin if EMPTYWAIT */
					ch->statusflags &= ~EMPTYWAIT;
					tty_wakeup(tty);
					wake_up_interruptible(&tty->write_wait);
				} /* End if EMPTYWAIT */
			} /* End EMPTYTX_IND */
		} /* End if valid tty */
+0 −1
Original line number Diff line number Diff line
@@ -382,7 +382,6 @@ void gs_flush_buffer(struct tty_struct *tty)
	port->xmit_cnt = port->xmit_head = port->xmit_tail = 0;
	spin_unlock_irqrestore (&port->driver_lock, flags);

	wake_up_interruptible(&tty->write_wait);
	tty_wakeup(tty);
	func_exit ();
}
+1 −9
Original line number Diff line number Diff line
@@ -1373,15 +1373,7 @@ ip2_owake( PTTY tp)
	ip2trace (CHANN, ITRC_SICMD, 10, 2, tp->flags,
			(1 << TTY_DO_WRITE_WAKEUP) );

	wake_up_interruptible ( &tp->write_wait );
	if ( ( tp->flags & (1 << TTY_DO_WRITE_WAKEUP) ) 
	  && tp->ldisc.write_wakeup )
	{
		(tp->ldisc.write_wakeup) ( tp );

		ip2trace (CHANN, ITRC_SICMD, 11, 0 );

	}
	tty_wakeup(tp);
}

static inline void
Loading