Skip to content

Commit ebd2c8f

Browse files
Alan CoxLive-CD User
authored andcommitted
serial: kill off uart_info
We moved this into uart_state, now move the fields out of the separate structure and kill it off. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
1 parent 11d85d7 commit ebd2c8f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+422
-432
lines changed

arch/mn10300/kernel/asm-offsets.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ void foo(void)
9595
OFFSET(__iobase, mn10300_serial_port, _iobase);
9696

9797
DEFINE(__UART_XMIT_SIZE, UART_XMIT_SIZE);
98-
OFFSET(__xmit_buffer, uart_info, xmit.buf);
99-
OFFSET(__xmit_head, uart_info, xmit.head);
100-
OFFSET(__xmit_tail, uart_info, xmit.tail);
98+
OFFSET(__xmit_buffer, uart_state, xmit.buf);
99+
OFFSET(__xmit_head, uart_state, xmit.head);
100+
OFFSET(__xmit_tail, uart_state, xmit.tail);
101101
}

drivers/serial/21285.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ static void serial21285_enable_ms(struct uart_port *port)
8686
static irqreturn_t serial21285_rx_chars(int irq, void *dev_id)
8787
{
8888
struct uart_port *port = dev_id;
89-
struct tty_struct *tty = port->info->port.tty;
89+
struct tty_struct *tty = port->state->port.tty;
9090
unsigned int status, ch, flag, rxs, max_count = 256;
9191

9292
status = *CSR_UARTFLG;
@@ -124,7 +124,7 @@ static irqreturn_t serial21285_rx_chars(int irq, void *dev_id)
124124
static irqreturn_t serial21285_tx_chars(int irq, void *dev_id)
125125
{
126126
struct uart_port *port = dev_id;
127-
struct circ_buf *xmit = &port->info->xmit;
127+
struct circ_buf *xmit = &port->state->xmit;
128128
int count = 256;
129129

130130
if (port->x_char) {
@@ -235,8 +235,8 @@ serial21285_set_termios(struct uart_port *port, struct ktermios *termios,
235235
baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk/16);
236236
quot = uart_get_divisor(port, baud);
237237

238-
if (port->info && port->info->port.tty) {
239-
struct tty_struct *tty = port->info->port.tty;
238+
if (port->state && port->state->port.tty) {
239+
struct tty_struct *tty = port->state->port.tty;
240240
unsigned int b = port->uartclk / (16 * quot);
241241
tty_encode_baud_rate(tty, b, b);
242242
}

drivers/serial/8250.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1382,7 +1382,7 @@ static void serial8250_enable_ms(struct uart_port *port)
13821382
static void
13831383
receive_chars(struct uart_8250_port *up, unsigned int *status)
13841384
{
1385-
struct tty_struct *tty = up->port.info->port.tty;
1385+
struct tty_struct *tty = up->port.state->port.tty;
13861386
unsigned char ch, lsr = *status;
13871387
int max_count = 256;
13881388
char flag;
@@ -1457,7 +1457,7 @@ receive_chars(struct uart_8250_port *up, unsigned int *status)
14571457

14581458
static void transmit_chars(struct uart_8250_port *up)
14591459
{
1460-
struct circ_buf *xmit = &up->port.info->xmit;
1460+
struct circ_buf *xmit = &up->port.state->xmit;
14611461
int count;
14621462

14631463
if (up->port.x_char) {
@@ -1500,7 +1500,7 @@ static unsigned int check_modem_status(struct uart_8250_port *up)
15001500
status |= up->msr_saved_flags;
15011501
up->msr_saved_flags = 0;
15021502
if (status & UART_MSR_ANY_DELTA && up->ier & UART_IER_MSI &&
1503-
up->port.info != NULL) {
1503+
up->port.state != NULL) {
15041504
if (status & UART_MSR_TERI)
15051505
up->port.icount.rng++;
15061506
if (status & UART_MSR_DDSR)
@@ -1510,7 +1510,7 @@ static unsigned int check_modem_status(struct uart_8250_port *up)
15101510
if (status & UART_MSR_DCTS)
15111511
uart_handle_cts_change(&up->port, status & UART_MSR_CTS);
15121512

1513-
wake_up_interruptible(&up->port.info->delta_msr_wait);
1513+
wake_up_interruptible(&up->port.state->delta_msr_wait);
15141514
}
15151515

15161516
return status;
@@ -1764,7 +1764,7 @@ static void serial8250_backup_timeout(unsigned long data)
17641764
up->lsr_saved_flags |= lsr & LSR_SAVE_FLAGS;
17651765
spin_unlock_irqrestore(&up->port.lock, flags);
17661766
if ((iir & UART_IIR_NO_INT) && (up->ier & UART_IER_THRI) &&
1767-
(!uart_circ_empty(&up->port.info->xmit) || up->port.x_char) &&
1767+
(!uart_circ_empty(&up->port.state->xmit) || up->port.x_char) &&
17681768
(lsr & UART_LSR_THRE)) {
17691769
iir &= ~(UART_IIR_ID | UART_IIR_NO_INT);
17701770
iir |= UART_IIR_THRI;

drivers/serial/amba-pl010.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ static void pl010_enable_ms(struct uart_port *port)
117117

118118
static void pl010_rx_chars(struct uart_amba_port *uap)
119119
{
120-
struct tty_struct *tty = uap->port.info->port.tty;
120+
struct tty_struct *tty = uap->port.state->port.tty;
121121
unsigned int status, ch, flag, rsr, max_count = 256;
122122

123123
status = readb(uap->port.membase + UART01x_FR);
@@ -172,7 +172,7 @@ static void pl010_rx_chars(struct uart_amba_port *uap)
172172

173173
static void pl010_tx_chars(struct uart_amba_port *uap)
174174
{
175-
struct circ_buf *xmit = &uap->port.info->xmit;
175+
struct circ_buf *xmit = &uap->port.state->xmit;
176176
int count;
177177

178178
if (uap->port.x_char) {
@@ -225,7 +225,7 @@ static void pl010_modem_status(struct uart_amba_port *uap)
225225
if (delta & UART01x_FR_CTS)
226226
uart_handle_cts_change(&uap->port, status & UART01x_FR_CTS);
227227

228-
wake_up_interruptible(&uap->port.info->delta_msr_wait);
228+
wake_up_interruptible(&uap->port.state->delta_msr_wait);
229229
}
230230

231231
static irqreturn_t pl010_int(int irq, void *dev_id)

drivers/serial/amba-pl011.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ static void pl011_enable_ms(struct uart_port *port)
124124

125125
static void pl011_rx_chars(struct uart_amba_port *uap)
126126
{
127-
struct tty_struct *tty = uap->port.info->port.tty;
127+
struct tty_struct *tty = uap->port.state->port.tty;
128128
unsigned int status, ch, flag, max_count = 256;
129129

130130
status = readw(uap->port.membase + UART01x_FR);
@@ -175,7 +175,7 @@ static void pl011_rx_chars(struct uart_amba_port *uap)
175175

176176
static void pl011_tx_chars(struct uart_amba_port *uap)
177177
{
178-
struct circ_buf *xmit = &uap->port.info->xmit;
178+
struct circ_buf *xmit = &uap->port.state->xmit;
179179
int count;
180180

181181
if (uap->port.x_char) {
@@ -226,7 +226,7 @@ static void pl011_modem_status(struct uart_amba_port *uap)
226226
if (delta & UART01x_FR_CTS)
227227
uart_handle_cts_change(&uap->port, status & UART01x_FR_CTS);
228228

229-
wake_up_interruptible(&uap->port.info->delta_msr_wait);
229+
wake_up_interruptible(&uap->port.state->delta_msr_wait);
230230
}
231231

232232
static irqreturn_t pl011_int(int irq, void *dev_id)

drivers/serial/atmel_serial.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ static void atmel_rx_chars(struct uart_port *port)
427427
*/
428428
static void atmel_tx_chars(struct uart_port *port)
429429
{
430-
struct circ_buf *xmit = &port->info->xmit;
430+
struct circ_buf *xmit = &port->state->xmit;
431431

432432
if (port->x_char && UART_GET_CSR(port) & ATMEL_US_TXRDY) {
433433
UART_PUT_CHAR(port, port->x_char);
@@ -560,7 +560,7 @@ static irqreturn_t atmel_interrupt(int irq, void *dev_id)
560560
static void atmel_tx_dma(struct uart_port *port)
561561
{
562562
struct atmel_uart_port *atmel_port = to_atmel_uart_port(port);
563-
struct circ_buf *xmit = &port->info->xmit;
563+
struct circ_buf *xmit = &port->state->xmit;
564564
struct atmel_dma_buffer *pdc = &atmel_port->pdc_tx;
565565
int count;
566566

@@ -663,14 +663,14 @@ static void atmel_rx_from_ring(struct uart_port *port)
663663
* uart_start(), which takes the lock.
664664
*/
665665
spin_unlock(&port->lock);
666-
tty_flip_buffer_push(port->info->port.tty);
666+
tty_flip_buffer_push(port->state->port.tty);
667667
spin_lock(&port->lock);
668668
}
669669

670670
static void atmel_rx_from_dma(struct uart_port *port)
671671
{
672672
struct atmel_uart_port *atmel_port = to_atmel_uart_port(port);
673-
struct tty_struct *tty = port->info->port.tty;
673+
struct tty_struct *tty = port->state->port.tty;
674674
struct atmel_dma_buffer *pdc;
675675
int rx_idx = atmel_port->pdc_rx_idx;
676676
unsigned int head;
@@ -776,7 +776,7 @@ static void atmel_tasklet_func(unsigned long data)
776776
if (status_change & ATMEL_US_CTS)
777777
uart_handle_cts_change(port, !(status & ATMEL_US_CTS));
778778

779-
wake_up_interruptible(&port->info->delta_msr_wait);
779+
wake_up_interruptible(&port->state->delta_msr_wait);
780780

781781
atmel_port->irq_status_prev = status;
782782
}
@@ -795,7 +795,7 @@ static void atmel_tasklet_func(unsigned long data)
795795
static int atmel_startup(struct uart_port *port)
796796
{
797797
struct atmel_uart_port *atmel_port = to_atmel_uart_port(port);
798-
struct tty_struct *tty = port->info->port.tty;
798+
struct tty_struct *tty = port->state->port.tty;
799799
int retval;
800800

801801
/*
@@ -854,7 +854,7 @@ static int atmel_startup(struct uart_port *port)
854854
}
855855
if (atmel_use_dma_tx(port)) {
856856
struct atmel_dma_buffer *pdc = &atmel_port->pdc_tx;
857-
struct circ_buf *xmit = &port->info->xmit;
857+
struct circ_buf *xmit = &port->state->xmit;
858858

859859
pdc->buf = xmit->buf;
860860
pdc->dma_addr = dma_map_single(port->dev,

drivers/serial/bfin_5xx.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ static void bfin_serial_stop_tx(struct uart_port *port)
144144
{
145145
struct bfin_serial_port *uart = (struct bfin_serial_port *)port;
146146
#ifdef CONFIG_SERIAL_BFIN_DMA
147-
struct circ_buf *xmit = &uart->port.info->xmit;
147+
struct circ_buf *xmit = &uart->port.state->xmit;
148148
#endif
149149

150150
while (!(UART_GET_LSR(uart) & TEMT))
@@ -171,7 +171,7 @@ static void bfin_serial_stop_tx(struct uart_port *port)
171171
static void bfin_serial_start_tx(struct uart_port *port)
172172
{
173173
struct bfin_serial_port *uart = (struct bfin_serial_port *)port;
174-
struct tty_struct *tty = uart->port.info->port.tty;
174+
struct tty_struct *tty = uart->port.state->port.tty;
175175

176176
#ifdef CONFIG_SERIAL_BFIN_HARD_CTSRTS
177177
if (uart->scts && !(bfin_serial_get_mctrl(&uart->port) & TIOCM_CTS)) {
@@ -243,10 +243,10 @@ static void bfin_serial_rx_chars(struct bfin_serial_port *uart)
243243
return;
244244
}
245245

246-
if (!uart->port.info || !uart->port.info->port.tty)
246+
if (!uart->port.state || !uart->port.state->port.tty)
247247
return;
248248
#endif
249-
tty = uart->port.info->port.tty;
249+
tty = uart->port.state->port.tty;
250250

251251
if (ANOMALY_05000363) {
252252
/* The BF533 (and BF561) family of processors have a nice anomaly
@@ -331,7 +331,7 @@ static void bfin_serial_rx_chars(struct bfin_serial_port *uart)
331331

332332
static void bfin_serial_tx_chars(struct bfin_serial_port *uart)
333333
{
334-
struct circ_buf *xmit = &uart->port.info->xmit;
334+
struct circ_buf *xmit = &uart->port.state->xmit;
335335

336336
if (uart_circ_empty(xmit) || uart_tx_stopped(&uart->port)) {
337337
#ifdef CONFIG_BF54x
@@ -398,7 +398,7 @@ static irqreturn_t bfin_serial_tx_int(int irq, void *dev_id)
398398
#ifdef CONFIG_SERIAL_BFIN_DMA
399399
static void bfin_serial_dma_tx_chars(struct bfin_serial_port *uart)
400400
{
401-
struct circ_buf *xmit = &uart->port.info->xmit;
401+
struct circ_buf *xmit = &uart->port.state->xmit;
402402

403403
uart->tx_done = 0;
404404

@@ -436,7 +436,7 @@ static void bfin_serial_dma_tx_chars(struct bfin_serial_port *uart)
436436

437437
static void bfin_serial_dma_rx_chars(struct bfin_serial_port *uart)
438438
{
439-
struct tty_struct *tty = uart->port.info->port.tty;
439+
struct tty_struct *tty = uart->port.state->port.tty;
440440
int i, flg, status;
441441

442442
status = UART_GET_LSR(uart);
@@ -529,7 +529,7 @@ void bfin_serial_rx_dma_timeout(struct bfin_serial_port *uart)
529529
static irqreturn_t bfin_serial_dma_tx_int(int irq, void *dev_id)
530530
{
531531
struct bfin_serial_port *uart = dev_id;
532-
struct circ_buf *xmit = &uart->port.info->xmit;
532+
struct circ_buf *xmit = &uart->port.state->xmit;
533533

534534
#ifdef CONFIG_SERIAL_BFIN_HARD_CTSRTS
535535
if (uart->scts && !(bfin_serial_get_mctrl(&uart->port)&TIOCM_CTS)) {
@@ -965,10 +965,10 @@ static void bfin_serial_set_ldisc(struct uart_port *port)
965965
int line = port->line;
966966
unsigned short val;
967967

968-
if (line >= port->info->port.tty->driver->num)
968+
if (line >= port->state->port.tty->driver->num)
969969
return;
970970

971-
switch (port->info->port.tty->termios->c_line) {
971+
switch (port->state->port.tty->termios->c_line) {
972972
case N_IRDA:
973973
val = UART_GET_GCTL(&bfin_serial_ports[line]);
974974
val |= (IREN | RPOLC);

drivers/serial/bfin_sport_uart.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ static int sport_uart_setup(struct sport_uart_port *up, int sclk, int baud_rate)
178178
static irqreturn_t sport_uart_rx_irq(int irq, void *dev_id)
179179
{
180180
struct sport_uart_port *up = dev_id;
181-
struct tty_struct *tty = up->port.info->port.tty;
181+
struct tty_struct *tty = up->port.state->port.tty;
182182
unsigned int ch;
183183

184184
do {
@@ -205,7 +205,7 @@ static irqreturn_t sport_uart_tx_irq(int irq, void *dev_id)
205205
static irqreturn_t sport_uart_err_irq(int irq, void *dev_id)
206206
{
207207
struct sport_uart_port *up = dev_id;
208-
struct tty_struct *tty = up->port.info->port.tty;
208+
struct tty_struct *tty = up->port.state->port.tty;
209209
unsigned int stat = SPORT_GET_STAT(up);
210210

211211
/* Overflow in RX FIFO */
@@ -290,7 +290,7 @@ static int sport_startup(struct uart_port *port)
290290

291291
static void sport_uart_tx_chars(struct sport_uart_port *up)
292292
{
293-
struct circ_buf *xmit = &up->port.info->xmit;
293+
struct circ_buf *xmit = &up->port.state->xmit;
294294

295295
if (SPORT_GET_STAT(up) & TXF)
296296
return;

drivers/serial/clps711x.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ static void clps711xuart_enable_ms(struct uart_port *port)
9393
static irqreturn_t clps711xuart_int_rx(int irq, void *dev_id)
9494
{
9595
struct uart_port *port = dev_id;
96-
struct tty_struct *tty = port->info->port.tty;
96+
struct tty_struct *tty = port->state->port.tty;
9797
unsigned int status, ch, flg;
9898

9999
status = clps_readl(SYSFLG(port));
@@ -147,7 +147,7 @@ static irqreturn_t clps711xuart_int_rx(int irq, void *dev_id)
147147
static irqreturn_t clps711xuart_int_tx(int irq, void *dev_id)
148148
{
149149
struct uart_port *port = dev_id;
150-
struct circ_buf *xmit = &port->info->xmit;
150+
struct circ_buf *xmit = &port->state->xmit;
151151
int count;
152152

153153
if (port->x_char) {

drivers/serial/cpm_uart/cpm_uart_core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ static void cpm_uart_int_rx(struct uart_port *port)
244244
int i;
245245
unsigned char ch;
246246
u8 *cp;
247-
struct tty_struct *tty = port->info->port.tty;
247+
struct tty_struct *tty = port->state->port.tty;
248248
struct uart_cpm_port *pinfo = (struct uart_cpm_port *)port;
249249
cbd_t __iomem *bdp;
250250
u16 status;

drivers/serial/dz.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ static inline void dz_receive_chars(struct dz_mux *mux)
197197
while ((status = dz_in(dport, DZ_RBUF)) & DZ_DVAL) {
198198
dport = &mux->dport[LINE(status)];
199199
uport = &dport->port;
200-
tty = uport->info->port.tty; /* point to the proper dev */
200+
tty = uport->state->port.tty; /* point to the proper dev */
201201

202202
ch = UCHAR(status); /* grab the char */
203203
flag = TTY_NORMAL;
@@ -249,7 +249,7 @@ static inline void dz_receive_chars(struct dz_mux *mux)
249249
}
250250
for (i = 0; i < DZ_NB_PORT; i++)
251251
if (lines_rx[i])
252-
tty_flip_buffer_push(mux->dport[i].port.info->port.tty);
252+
tty_flip_buffer_push(mux->dport[i].port.state->port.tty);
253253
}
254254

255255
/*
@@ -268,7 +268,7 @@ static inline void dz_transmit_chars(struct dz_mux *mux)
268268

269269
status = dz_in(dport, DZ_CSR);
270270
dport = &mux->dport[LINE(status)];
271-
xmit = &dport->port.info->xmit;
271+
xmit = &dport->port.state->xmit;
272272

273273
if (dport->port.x_char) { /* XON/XOFF chars */
274274
dz_out(dport, DZ_TDR, dport->port.x_char);

0 commit comments

Comments
 (0)