Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/ic fix a bit that I missed in the device_t/softc spl...



details:   https://anonhg.NetBSD.org/src/rev/dae890f9718a
branches:  trunk
changeset: 1012896:dae890f9718a
user:      chs <chs%NetBSD.org@localhost>
date:      Fri Aug 14 09:28:29 2020 +0000

description:
fix a bit that I missed in the device_t/softc split 8 years ago.

diffstat:

 sys/dev/ic/ld_icp.c |  11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diffs (42 lines):

diff -r 779c00f0bf7c -r dae890f9718a sys/dev/ic/ld_icp.c
--- a/sys/dev/ic/ld_icp.c       Fri Aug 14 09:26:40 2020 +0000
+++ b/sys/dev/ic/ld_icp.c       Fri Aug 14 09:28:29 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ld_icp.c,v 1.31 2017/02/27 21:32:33 jdolecek Exp $     */
+/*     $NetBSD: ld_icp.c,v 1.32 2020/08/14 09:28:29 chs Exp $  */
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ld_icp.c,v 1.31 2017/02/27 21:32:33 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ld_icp.c,v 1.32 2020/08/14 09:28:29 chs Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -167,11 +167,12 @@
 static int
 ld_icp_detach(device_t dv, int flags)
 {
+       struct ld_softc *ldsc = device_private(dv);
        int rv;
 
-       if ((rv = ldbegindetach((struct ld_softc *)dv, flags)) != 0)
+       if ((rv = ldbegindetach(ldsc, flags)) != 0)
                return (rv);
-       ldenddetach((struct ld_softc *) dv);
+       ldenddetach(ldsc);
 
        return (0);
 }
@@ -345,7 +346,7 @@
 ld_icp_adjqparam(device_t dv, int openings)
 {
 
-       ldadjqparam((struct ld_softc *) dv, openings);
+       ldadjqparam(device_private(dv), openings);
 }
 
 MODULE(MODULE_CLASS_DRIVER, ld_icp, "ld");     /* no icp module yet */



Home | Main Index | Thread Index | Old Index