Skip to content

Commit

Permalink
sc16is7xx: Don't spin if no data received
Browse files Browse the repository at this point in the history
See: #2676

Signed-off-by: Phil Elwell <[email protected]>
  • Loading branch information
Phil Elwell committed Nov 6, 2018
1 parent 36612d5 commit 9ca74c5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/tty/serial/sc16is7xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -701,6 +701,8 @@ static bool sc16is7xx_port_irq(struct sc16is7xx_port *s, int portno)
rxlen = sc16is7xx_port_read(port, SC16IS7XX_RXLVL_REG);
if (rxlen)
sc16is7xx_handle_rx(port, rxlen, iir);
else
return false;
break;
case SC16IS7XX_IIR_THRI_SRC:
sc16is7xx_handle_tx(port);
Expand Down

4 comments on commit 9ca74c5

@lyakh
Copy link
Contributor

@lyakh lyakh commented on 9ca74c5 Nov 30, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sc16is7xx_port_irq() returns void, it should be simply "return;" The present version fails to compile at least with some compiler versions.

@pelwell
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which kernel version are you looking at? It returns a bool in rpi-4.14.y, rpi-4.19.y and rpi-4.20.y.

@gerwin-git
Copy link

@gerwin-git gerwin-git commented on 9ca74c5 Nov 30, 2018 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lyakh
Copy link
Contributor

@lyakh lyakh commented on 9ca74c5 Nov 30, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, I was looking at the kernel before a recent patch, that went into the mainline and also into stable kernels. So, in 4.18.20 it's bool, but in 4.8.19 it's still void. Sorry for the noise.

Please sign in to comment.