Module Name: src
Committed By: gdt
Date: Tue Mar 2 00:18:22 UTC 2021
Modified Files:
src/sys/dev/usb: ukbd.c
Log Message:
ukbd: GC some 20 year old code (NFC)
Long ago, code was improved to allow detaching keyboards that were the
console, but the old commen and panic() were #if 0'd instead of
removed.
To generate a diff of this commit:
cvs rdiff -u -r1.148 -r1.149 src/sys/dev/usb/ukbd.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/usb/ukbd.c
diff -u src/sys/dev/usb/ukbd.c:1.148 src/sys/dev/usb/ukbd.c:1.149
--- src/sys/dev/usb/ukbd.c:1.148 Tue Mar 2 00:01:27 2021
+++ src/sys/dev/usb/ukbd.c Tue Mar 2 00:18:22 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: ukbd.c,v 1.148 2021/03/02 00:01:27 gdt Exp $ */
+/* $NetBSD: ukbd.c,v 1.149 2021/03/02 00:18:22 gdt Exp $ */
/*
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ukbd.c,v 1.148 2021/03/02 00:01:27 gdt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ukbd.c,v 1.149 2021/03/02 00:18:22 gdt Exp $");
#ifdef _KERNEL_OPT
#include "opt_ddb.h"
@@ -555,17 +555,6 @@ ukbd_detach(device_t self, int flags)
pmf_device_deregister(self);
if (sc->sc_console_keyboard) {
-#if 0
- /*
- * XXX Should probably disconnect our consops,
- * XXX and either notify some other keyboard that
- * XXX it can now be the console, or if there aren't
- * XXX any more USB keyboards, set ukbd_is_console
- * XXX back to 1 so that the next USB keyboard attached
- * XXX to the system will get it.
- */
- panic("ukbd_detach: console keyboard");
-#else
/*
* Disconnect our consops and set ukbd_is_console
* back to 1 so that the next USB keyboard attached
@@ -577,7 +566,6 @@ ukbd_detach(device_t self, int flags)
device_xname(sc->sc_hdev.sc_dev));
wskbd_cndetach();
ukbd_is_console = 1;
-#endif
}
/* No need to do reference counting of ukbd, wskbd has all the goo. */
if (sc->sc_wskbddev != NULL)