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): Fix unit numbering for devsw/autoconf c...
details: https://anonhg.NetBSD.org/src/rev/2ac3ed713f97
branches: trunk
changeset: 364704:2ac3ed713f97
user: riastradh <riastradh%NetBSD.org@localhost>
date: Thu Apr 07 17:35:31 2022 +0000
description:
ucom(4): Fix unit numbering for devsw/autoconf cross-wiring.
Should introduce a tty_unit function to use here but this'll do for
now to fix the bug I introduced in ucom(4).
diffstat:
sys/dev/usb/ucom.c | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
diffs (40 lines):
diff -r 25d4d75d4faa -r 2ac3ed713f97 sys/dev/usb/ucom.c
--- a/sys/dev/usb/ucom.c Thu Apr 07 13:57:44 2022 +0000
+++ b/sys/dev/usb/ucom.c Thu Apr 07 17:35:31 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ucom.c,v 1.130 2022/03/28 12:42:37 riastradh Exp $ */
+/* $NetBSD: ucom.c,v 1.131 2022/04/07 17:35:31 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.130 2022/03/28 12:42:37 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ucom.c,v 1.131 2022/04/07 17:35:31 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@@ -205,6 +205,12 @@
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,
@@ -219,7 +225,7 @@
.d_kqfilter = ttykqfilter,
.d_discard = nodiscard,
.d_cfdriver = &ucom_cd,
- .d_devtounit = dev_minor_unit,
+ .d_devtounit = ucom_unit,
.d_flag = D_TTY | D_MPSAFE
};
Home |
Main Index |
Thread Index |
Old Index