Skip to content

Commit 6aed2a8

Browse files
Uwe Kleine-Königgregkh
authored andcommitted
serial: imx: document functions that are called with port.lock taken
Consistently indicate being called with irqs off and the port lock taken for all functions that this applies to. Signed-off-by: Uwe Kleine-König <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 302e8dc commit 6aed2a8

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed

drivers/tty/serial/imx.c

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -342,9 +342,7 @@ static void imx_port_rts_auto(struct imx_port *sport, unsigned long *ucr2)
342342
*ucr2 |= UCR2_CTSC;
343343
}
344344

345-
/*
346-
* interrupts disabled on entry
347-
*/
345+
/* called with port.lock taken and irqs off */
348346
static void imx_stop_tx(struct uart_port *port)
349347
{
350348
struct imx_port *sport = (struct imx_port *)port;
@@ -377,9 +375,7 @@ static void imx_stop_tx(struct uart_port *port)
377375
}
378376
}
379377

380-
/*
381-
* interrupts disabled on entry
382-
*/
378+
/* called with port.lock taken and irqs off */
383379
static void imx_stop_rx(struct uart_port *port)
384380
{
385381
struct imx_port *sport = (struct imx_port *)port;
@@ -402,9 +398,7 @@ static void imx_stop_rx(struct uart_port *port)
402398
writel(temp & ~UCR1_RRDYEN, sport->port.membase + UCR1);
403399
}
404400

405-
/*
406-
* Set the modem control timer to fire immediately.
407-
*/
401+
/* called with port.lock taken and irqs off */
408402
static void imx_enable_ms(struct uart_port *port)
409403
{
410404
struct imx_port *sport = (struct imx_port *)port;
@@ -415,6 +409,8 @@ static void imx_enable_ms(struct uart_port *port)
415409
}
416410

417411
static void imx_dma_tx(struct imx_port *sport);
412+
413+
/* called with port.lock taken and irqs off */
418414
static inline void imx_transmit_buffer(struct imx_port *sport)
419415
{
420416
struct circ_buf *xmit = &sport->port.state->xmit;
@@ -501,6 +497,7 @@ static void dma_tx_callback(void *data)
501497
spin_unlock_irqrestore(&sport->port.lock, flags);
502498
}
503499

500+
/* called with port.lock taken and irqs off */
504501
static void imx_dma_tx(struct imx_port *sport)
505502
{
506503
struct circ_buf *xmit = &sport->port.state->xmit;
@@ -557,9 +554,7 @@ static void imx_dma_tx(struct imx_port *sport)
557554
return;
558555
}
559556

560-
/*
561-
* interrupts disabled on entry
562-
*/
557+
/* called with port.lock taken and irqs off */
563558
static void imx_start_tx(struct uart_port *port)
564559
{
565560
struct imx_port *sport = (struct imx_port *)port;
@@ -850,6 +845,7 @@ static unsigned int imx_tx_empty(struct uart_port *port)
850845
return ret;
851846
}
852847

848+
/* called with port.lock taken and irqs off */
853849
static unsigned int imx_get_mctrl(struct uart_port *port)
854850
{
855851
struct imx_port *sport = (struct imx_port *)port;
@@ -860,6 +856,7 @@ static unsigned int imx_get_mctrl(struct uart_port *port)
860856
return ret;
861857
}
862858

859+
/* called with port.lock taken and irqs off */
863860
static void imx_set_mctrl(struct uart_port *port, unsigned int mctrl)
864861
{
865862
struct imx_port *sport = (struct imx_port *)port;
@@ -1364,6 +1361,7 @@ static void imx_shutdown(struct uart_port *port)
13641361
clk_disable_unprepare(sport->clk_ipg);
13651362
}
13661363

1364+
/* called with port.lock taken and irqs off */
13671365
static void imx_flush_buffer(struct uart_port *port)
13681366
{
13691367
struct imx_port *sport = (struct imx_port *)port;
@@ -1689,6 +1687,7 @@ static void imx_poll_put_char(struct uart_port *port, unsigned char c)
16891687
}
16901688
#endif
16911689

1690+
/* called with port.lock taken and irqs off or from .probe without locking */
16921691
static int imx_rs485_config(struct uart_port *port,
16931692
struct serial_rs485 *rs485conf)
16941693
{

0 commit comments

Comments
 (0)