Deleted Added
full compact
28c28
< __FBSDID("$FreeBSD: head/sys/dev/uart/uart_dev_z8530.c 157300 2006-03-30 18:37:03Z marcel $");
---
> __FBSDID("$FreeBSD: head/sys/dev/uart/uart_dev_z8530.c 157380 2006-04-01 19:04:54Z marcel $");
181c181
< static int z8530_getc(struct uart_bas *bas);
---
> static int z8530_getc(struct uart_bas *bas, struct mtx *);
232c232
< z8530_getc(struct uart_bas *bas)
---
> z8530_getc(struct uart_bas *bas, struct mtx *hwmtx)
233a234
> int c;
235,237c236,248
< while (!(uart_getreg(bas, REG_CTRL) & BES_RXA))
< ;
< return (uart_getreg(bas, REG_DATA));
---
> uart_lock(hwmtx);
>
> while (!(uart_getreg(bas, REG_CTRL) & BES_RXA)) {
> uart_unlock(hwmtx);
> DELAY(10);
> uart_lock(hwmtx);
> }
>
> c = uart_getreg(bas, REG_DATA);
>
> uart_unlock(hwmtx);
>
> return (c);