summaryrefslogtreecommitdiff
path: root/sys/dev/usb
diff options
context:
space:
mode:
authorriastradh <riastradh@NetBSD.org>2022-04-07 21:47:02 +0000
committerriastradh <riastradh@NetBSD.org>2022-04-07 21:47:02 +0000
commit7eee5488e2a92e4d7a81faf94f2ce0cc727f9fa8 (patch)
tree65c2ec2b9a819b27c4b04fb8cbeb6c4d0e90672f /sys/dev/usb
parent23eb39c770c3e51040479ccdd31ea92889007c27 (diff)
ucom(4): Use tty_unit -- save a couple lines of code.
Diffstat (limited to 'sys/dev/usb')
-rw-r--r--sys/dev/usb/ucom.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/sys/dev/usb/ucom.c b/sys/dev/usb/ucom.c
index c9d02ed1983..08d529819e9 100644
--- a/sys/dev/usb/ucom.c
+++ b/sys/dev/usb/ucom.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ucom.c,v 1.131 2022/04/07 17:35:31 riastradh Exp $ */
+/* $NetBSD: ucom.c,v 1.132 2022/04/07 21:47:02 riastradh Exp $ */
/*
* Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ucom.c,v 1.131 2022/04/07 17:35:31 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ucom.c,v 1.132 2022/04/07 21:47:02 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@@ -122,6 +122,7 @@ fail:
#define UCOMCALLUNIT(x) TTCALLUNIT(x)
#define UCOMUNIT(x) TTUNIT(x)
#define UCOMDIALOUT(x) TTDIALOUT(x)
+#define ucom_unit tty_unit
/*
* XXX: We can submit multiple input/output buffers to the usb stack
@@ -205,12 +206,6 @@ dev_type_stop(ucomstop);
dev_type_tty(ucomtty);
dev_type_poll(ucompoll);
-static int
-ucom_unit(dev_t dev)
-{
- return UCOMUNIT(dev);
-}
-
const struct cdevsw ucom_cdevsw = {
.d_open = ucomopen,
.d_cancel = ucomcancel,