aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/uart/uart_cpu.h
diff options
context:
space:
mode:
authorMarcel Moolenaar <marcel@FreeBSD.org>2006-04-01 19:04:54 +0000
committerMarcel Moolenaar <marcel@FreeBSD.org>2006-04-01 19:04:54 +0000
commit634e63c986ba07fd015e3854392d44eec6e0ad35 (patch)
treef866ed454b38b3e3ed100d7237faffef820e51f3 /sys/dev/uart/uart_cpu.h
parent3586fcede95f5c5ccedb4e1fc695db18d456d46e (diff)
Notes
Diffstat (limited to 'sys/dev/uart/uart_cpu.h')
-rw-r--r--sys/dev/uart/uart_cpu.h8
1 files changed, 2 insertions, 6 deletions
diff --git a/sys/dev/uart/uart_cpu.h b/sys/dev/uart/uart_cpu.h
index 310d6b99bf96..a3f0dcb9b56b 100644
--- a/sys/dev/uart/uart_cpu.h
+++ b/sys/dev/uart/uart_cpu.h
@@ -42,7 +42,7 @@ struct uart_ops {
void (*term)(struct uart_bas *);
void (*putc)(struct uart_bas *, int);
int (*poll)(struct uart_bas *);
- int (*getc)(struct uart_bas *);
+ int (*getc)(struct uart_bas *, struct mtx *);
};
extern struct uart_ops uart_i8251_ops;
@@ -150,12 +150,8 @@ uart_poll(struct uart_devinfo *di)
static __inline int
uart_getc(struct uart_devinfo *di)
{
- int res;
- uart_lock(di->hwmtx);
- res = di->ops.getc(&di->bas);
- uart_unlock(di->hwmtx);
- return (res);
+ return (di->ops.getc(&di->bas, di->hwmtx));
}
#endif /* _DEV_UART_CPU_H_ */