summaryrefslogtreecommitdiffstats
path: root/sys/dev/uart/uart_cpu.h
diff options
context:
space:
mode:
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 310d6b9..a3f0dcb 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_ */
OpenPOWER on IntegriCloud