Skip to content

Commit dbf3f09

Browse files
Jiri Slabygregkh
authored andcommitted
tty: serial: mpc52xx_uart: make rx/tx hooks return unsigned, part II.
The below commit changed types of some hooks in struct psc_ops. It also changed the types of the functions which are referenced in the instances of the above struct. However the commit did so only for CONFIG_PPC_MPC52xx, but not for CONFIG_PPC_MPC512x. This results in build errors like: mpc52xx_uart.c:static unsigned int mpc52xx_psc_raw_tx_rdy(struct uart_port *port) mpc52xx_uart.c:static int mpc512x_psc_raw_tx_rdy(struct uart_port *port) ^^^ mpc52xx_uart.c:static int mpc5125_psc_raw_tx_rdy(struct uart_port *port) ^^^ Therefore, fix the latter case now too. Fixes: 18662a1 (tty: serial: mpc52xx_uart: make rx/tx hooks return unsigned) Cc: Linus Torvalds <[email protected]> Reported-by: Guenter Roeck <[email protected]> Signed-off-by: Jiri Slaby <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 3123109 commit dbf3f09

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

drivers/tty/serial/mpc52xx_uart.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -436,31 +436,31 @@ static void mpc512x_psc_fifo_init(struct uart_port *port)
436436
out_be32(&FIFO_512x(port)->rximr, MPC512x_PSC_FIFO_ALARM);
437437
}
438438

439-
static int mpc512x_psc_raw_rx_rdy(struct uart_port *port)
439+
static unsigned int mpc512x_psc_raw_rx_rdy(struct uart_port *port)
440440
{
441441
return !(in_be32(&FIFO_512x(port)->rxsr) & MPC512x_PSC_FIFO_EMPTY);
442442
}
443443

444-
static int mpc512x_psc_raw_tx_rdy(struct uart_port *port)
444+
static unsigned int mpc512x_psc_raw_tx_rdy(struct uart_port *port)
445445
{
446446
return !(in_be32(&FIFO_512x(port)->txsr) & MPC512x_PSC_FIFO_FULL);
447447
}
448448

449-
static int mpc512x_psc_rx_rdy(struct uart_port *port)
449+
static unsigned int mpc512x_psc_rx_rdy(struct uart_port *port)
450450
{
451451
return in_be32(&FIFO_512x(port)->rxsr)
452452
& in_be32(&FIFO_512x(port)->rximr)
453453
& MPC512x_PSC_FIFO_ALARM;
454454
}
455455

456-
static int mpc512x_psc_tx_rdy(struct uart_port *port)
456+
static unsigned int mpc512x_psc_tx_rdy(struct uart_port *port)
457457
{
458458
return in_be32(&FIFO_512x(port)->txsr)
459459
& in_be32(&FIFO_512x(port)->tximr)
460460
& MPC512x_PSC_FIFO_ALARM;
461461
}
462462

463-
static int mpc512x_psc_tx_empty(struct uart_port *port)
463+
static unsigned int mpc512x_psc_tx_empty(struct uart_port *port)
464464
{
465465
return in_be32(&FIFO_512x(port)->txsr)
466466
& MPC512x_PSC_FIFO_EMPTY;
@@ -780,29 +780,29 @@ static void mpc5125_psc_fifo_init(struct uart_port *port)
780780
out_be32(&FIFO_5125(port)->rximr, MPC512x_PSC_FIFO_ALARM);
781781
}
782782

783-
static int mpc5125_psc_raw_rx_rdy(struct uart_port *port)
783+
static unsigned int mpc5125_psc_raw_rx_rdy(struct uart_port *port)
784784
{
785785
return !(in_be32(&FIFO_5125(port)->rxsr) & MPC512x_PSC_FIFO_EMPTY);
786786
}
787787

788-
static int mpc5125_psc_raw_tx_rdy(struct uart_port *port)
788+
static unsigned int mpc5125_psc_raw_tx_rdy(struct uart_port *port)
789789
{
790790
return !(in_be32(&FIFO_5125(port)->txsr) & MPC512x_PSC_FIFO_FULL);
791791
}
792792

793-
static int mpc5125_psc_rx_rdy(struct uart_port *port)
793+
static unsigned int mpc5125_psc_rx_rdy(struct uart_port *port)
794794
{
795795
return in_be32(&FIFO_5125(port)->rxsr) &
796796
in_be32(&FIFO_5125(port)->rximr) & MPC512x_PSC_FIFO_ALARM;
797797
}
798798

799-
static int mpc5125_psc_tx_rdy(struct uart_port *port)
799+
static unsigned int mpc5125_psc_tx_rdy(struct uart_port *port)
800800
{
801801
return in_be32(&FIFO_5125(port)->txsr) &
802802
in_be32(&FIFO_5125(port)->tximr) & MPC512x_PSC_FIFO_ALARM;
803803
}
804804

805-
static int mpc5125_psc_tx_empty(struct uart_port *port)
805+
static unsigned int mpc5125_psc_tx_empty(struct uart_port *port)
806806
{
807807
return in_be32(&FIFO_5125(port)->txsr) & MPC512x_PSC_FIFO_EMPTY;
808808
}

0 commit comments

Comments
 (0)