Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/usb ukbd: GC some 20 year old code (NFC)



details:   https://anonhg.NetBSD.org/src/rev/ef02c144f825
branches:  trunk
changeset: 953240:ef02c144f825
user:      gdt <gdt%NetBSD.org@localhost>
date:      Tue Mar 02 00:18:22 2021 +0000

description:
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.

diffstat:

 sys/dev/usb/ukbd.c |  16 ++--------------
 1 files changed, 2 insertions(+), 14 deletions(-)

diffs (44 lines):

diff -r 1122d186d3f0 -r ef02c144f825 sys/dev/usb/ukbd.c
--- a/sys/dev/usb/ukbd.c        Tue Mar 02 00:01:27 2021 +0000
+++ b/sys/dev/usb/ukbd.c        Tue Mar 02 00:18:22 2021 +0000
@@ -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 @@
        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 @@
                       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)



Home | Main Index | Thread Index | Old Index