File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -624,6 +624,23 @@ struct uart_state {
624
624
/* number of characters left in xmit buffer before we ask for more */
625
625
#define WAKEUP_CHARS 256
626
626
627
+ /**
628
+ * uart_xmit_advance - Advance xmit buffer and account Tx'ed chars
629
+ * @up: uart_port structure describing the port
630
+ * @chars: number of characters sent
631
+ *
632
+ * This function advances the tail of circular xmit buffer by the number of
633
+ * @chars transmitted and handles accounting of transmitted bytes (into
634
+ * @up's icount.tx).
635
+ */
636
+ static inline void uart_xmit_advance (struct uart_port * up , unsigned int chars )
637
+ {
638
+ struct circ_buf * xmit = & up -> state -> xmit ;
639
+
640
+ xmit -> tail = (xmit -> tail + chars ) & (UART_XMIT_SIZE - 1 );
641
+ up -> icount .tx += chars ;
642
+ }
643
+
627
644
struct module ;
628
645
struct tty_driver ;
629
646
You can’t perform that action at this time.
0 commit comments