Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/hpc hpf1275a(4): Use config_detach_children.



details:   https://anonhg.NetBSD.org/src/rev/bcdabb8d3038
branches:  trunk
changeset: 374693:bcdabb8d3038
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Wed May 10 00:09:54 2023 +0000

description:
hpf1275a(4): Use config_detach_children.

diffstat:

 sys/dev/hpc/hpf1275a_tty.c |  13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)

diffs (35 lines):

diff -r 33cc2b769644 -r bcdabb8d3038 sys/dev/hpc/hpf1275a_tty.c
--- a/sys/dev/hpc/hpf1275a_tty.c        Wed May 10 00:09:47 2023 +0000
+++ b/sys/dev/hpc/hpf1275a_tty.c        Wed May 10 00:09:54 2023 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: hpf1275a_tty.c,v 1.32 2022/10/26 23:45:10 riastradh Exp $ */
+/*     $NetBSD: hpf1275a_tty.c,v 1.33 2023/05/10 00:09:54 riastradh Exp $ */
 
 /*
  * Copyright (c) 2004 Valeriy E. Ushakov
@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: hpf1275a_tty.c,v 1.32 2022/10/26 23:45:10 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hpf1275a_tty.c,v 1.33 2023/05/10 00:09:54 riastradh Exp $");
 
 #include "opt_wsdisplay_compat.h"
 
@@ -284,12 +284,11 @@ hpf1275a_detach(device_t self, int flags
        struct hpf1275a_softc *sc = device_private(self);
        int error;
 
-       if (sc->sc_wskbd == NULL)
-               return (0);
+       error = config_detach_children(self, flags);
+       if (error)
+               return error;
 
-       error = config_detach(sc->sc_wskbd, 0);
-
-       return (error);
+       return 0;
 }
 
 



Home | Main Index | Thread Index | Old Index