Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/usb ucom(4): Use tty_unit -- save a couple lines of ...



details:   https://anonhg.NetBSD.org/src/rev/d9ca4be37275
branches:  trunk
changeset: 364708:d9ca4be37275
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Thu Apr 07 21:47:02 2022 +0000

description:
ucom(4): Use tty_unit -- save a couple lines of code.

diffstat:

 sys/dev/usb/ucom.c |  11 +++--------
 1 files changed, 3 insertions(+), 8 deletions(-)

diffs (39 lines):

diff -r deb1f14c257b -r d9ca4be37275 sys/dev/usb/ucom.c
--- a/sys/dev/usb/ucom.c        Thu Apr 07 21:46:51 2022 +0000
+++ b/sys/dev/usb/ucom.c        Thu Apr 07 21:47:02 2022 +0000
@@ -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 @@
 #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_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,



Home | Main Index | Thread Index | Old Index