Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 83917
b: refs/heads/master
c: 319fe7c
h: refs/heads/master
i:
  83915: c08dbe6
v: v3
  • Loading branch information
Jiri Slaby authored and Linus Torvalds committed Feb 7, 2008
1 parent 54e7ddc commit 7a76747
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f31e6835054f577d4d3193aed1f464b149483377
refs/heads/master: 319fe7c347ad2bdd99ea9b62c65ca81584ed2e1c
10 changes: 6 additions & 4 deletions trunk/drivers/char/stallion.c
Original file line number Diff line number Diff line change
Expand Up @@ -3546,7 +3546,8 @@ static void stl_cd1400txisr(struct stlpanel *panelp, int ioaddr)
} else {
len = min(len, CD1400_TXFIFOSIZE);
portp->stats.txtotal += len;
stlen = min(len, ((portp->tx.buf + STL_TXBUFSIZE) - tail));
stlen = min_t(unsigned int, len,
(portp->tx.buf + STL_TXBUFSIZE) - tail);
outb((TDR + portp->uartaddr), ioaddr);
outsb((ioaddr + EREG_DATA), tail, stlen);
len -= stlen;
Expand Down Expand Up @@ -3599,7 +3600,7 @@ static void stl_cd1400rxisr(struct stlpanel *panelp, int ioaddr)
outb((RDCR + portp->uartaddr), ioaddr);
len = inb(ioaddr + EREG_DATA);
if (tty == NULL || (buflen = tty_buffer_request_room(tty, len)) == 0) {
len = min(len, sizeof(stl_unwanted));
len = min_t(unsigned int, len, sizeof(stl_unwanted));
outb((RDSR + portp->uartaddr), ioaddr);
insb((ioaddr + EREG_DATA), &stl_unwanted[0], len);
portp->stats.rxlost += len;
Expand Down Expand Up @@ -4465,7 +4466,8 @@ static void stl_sc26198txisr(struct stlport *portp)
} else {
len = min(len, SC26198_TXFIFOSIZE);
portp->stats.txtotal += len;
stlen = min(len, ((portp->tx.buf + STL_TXBUFSIZE) - tail));
stlen = min_t(unsigned int, len,
(portp->tx.buf + STL_TXBUFSIZE) - tail);
outb(GTXFIFO, (ioaddr + XP_ADDR));
outsb((ioaddr + XP_DATA), tail, stlen);
len -= stlen;
Expand Down Expand Up @@ -4506,7 +4508,7 @@ static void stl_sc26198rxisr(struct stlport *portp, unsigned int iack)

if ((iack & IVR_TYPEMASK) == IVR_RXDATA) {
if (tty == NULL || (buflen = tty_buffer_request_room(tty, len)) == 0) {
len = min(len, sizeof(stl_unwanted));
len = min_t(unsigned int, len, sizeof(stl_unwanted));
outb(GRXFIFO, (ioaddr + XP_ADDR));
insb((ioaddr + XP_DATA), &stl_unwanted[0], len);
portp->stats.rxlost += len;
Expand Down

0 comments on commit 7a76747

Please sign in to comment.