Source-Changes-HG archive

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

[src/trunk]: src/sys Add missing initialization of sc_dev.



details:   https://anonhg.NetBSD.org/src/rev/7f727c004256
branches:  trunk
changeset: 460986:7f727c004256
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Tue Nov 12 13:17:43 2019 +0000

description:
Add missing initialization of sc_dev.

diffstat:

 sys/arch/amiga/dev/if_qn.c         |  5 +++--
 sys/arch/amiga/dev/zssc.c          |  8 ++++----
 sys/arch/mac68k/obio/iwm_fd.c      |  5 +++--
 sys/arch/mvme68k/dev/wdsc.c        |  5 +++--
 sys/arch/next68k/dev/nextdisplay.c |  6 ++++--
 sys/dev/gpib/ct.c                  |  5 +++--
 sys/dev/gpib/mt.c                  |  5 +++--
 sys/dev/gpib/ppi.c                 |  5 +++--
 sys/dev/isa/if_iy.c                |  5 +++--
 sys/dev/isa/mcd.c                  |  5 +++--
 sys/dev/isa/tcic2_isa.c            |  5 +++--
 sys/dev/pci/neo.c                  |  5 +++--
 sys/dev/pcmcia/if_tr_pcmcia.c      |  5 +++--
 sys/dev/sbus/sio16.c               |  5 +++--
 14 files changed, 44 insertions(+), 30 deletions(-)

diffs (truncated from 375 to 300 lines):

diff -r e07772ffbc0d -r 7f727c004256 sys/arch/amiga/dev/if_qn.c
--- a/sys/arch/amiga/dev/if_qn.c        Tue Nov 12 13:10:51 2019 +0000
+++ b/sys/arch/amiga/dev/if_qn.c        Tue Nov 12 13:17:43 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_qn.c,v 1.47 2019/02/05 06:17:00 msaitoh Exp $ */
+/*     $NetBSD: if_qn.c,v 1.48 2019/11/12 13:17:43 msaitoh Exp $ */
 
 /*
  * Copyright (c) 1995 Mika Kortelainen
@@ -66,7 +66,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_qn.c,v 1.47 2019/02/05 06:17:00 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_qn.c,v 1.48 2019/11/12 13:17:43 msaitoh Exp $");
 
 #include "qn.h"
 #if NQN > 0
@@ -195,6 +195,7 @@
        struct ifnet *ifp = &sc->sc_ethercom.ec_if;
        u_int8_t myaddr[ETHER_ADDR_LEN];
 
+       sc->sc_dev = self;
        zap = (struct zbus_args *)aux;
 
        sc->sc_base = zap->va;
diff -r e07772ffbc0d -r 7f727c004256 sys/arch/amiga/dev/zssc.c
--- a/sys/arch/amiga/dev/zssc.c Tue Nov 12 13:10:51 2019 +0000
+++ b/sys/arch/amiga/dev/zssc.c Tue Nov 12 13:17:43 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: zssc.c,v 1.45 2012/10/27 17:17:32 chs Exp $ */
+/*     $NetBSD: zssc.c,v 1.46 2019/11/12 13:17:43 msaitoh Exp $ */
 
 /*
  * Copyright (c) 1982, 1990 The Regents of the University of California.
@@ -58,7 +58,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: zssc.c,v 1.45 2012/10/27 17:17:32 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: zssc.c,v 1.46 2019/11/12 13:17:43 msaitoh Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -103,15 +103,15 @@
 void
 zsscattach(device_t parent, device_t self, void *aux)
 {
-       struct siop_softc *sc;
+       struct siop_softc *sc = device_private(self);
        struct zbus_args *zap;
        siop_regmap_p rp;
 
        printf("\n");
 
+       sc->sc_dev = self;
        zap = aux;
 
-       sc = device_private(self);
        sc->sc_siopp = rp = (siop_regmap_p)((char *)zap->va + 0x4000);
 
        /*
diff -r e07772ffbc0d -r 7f727c004256 sys/arch/mac68k/obio/iwm_fd.c
--- a/sys/arch/mac68k/obio/iwm_fd.c     Tue Nov 12 13:10:51 2019 +0000
+++ b/sys/arch/mac68k/obio/iwm_fd.c     Tue Nov 12 13:17:43 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: iwm_fd.c,v 1.56 2015/04/26 15:15:19 mlelstv Exp $      */
+/*     $NetBSD: iwm_fd.c,v 1.57 2019/11/12 13:17:43 msaitoh Exp $      */
 
 /*
  * Copyright (c) 1997, 1998 Hauke Fath.  All rights reserved.
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: iwm_fd.c,v 1.56 2015/04/26 15:15:19 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: iwm_fd.c,v 1.57 2019/11/12 13:17:43 msaitoh Exp $");
 
 #include "locators.h"
 
@@ -441,6 +441,7 @@
 
        iwm = device_private(parent);
        fd = device_private(self);
+       fd->sc_dev = self;
        ia = aux;
 
        driveInfo = iwmCheckDrive(ia->unit);
diff -r e07772ffbc0d -r 7f727c004256 sys/arch/mvme68k/dev/wdsc.c
--- a/sys/arch/mvme68k/dev/wdsc.c       Tue Nov 12 13:10:51 2019 +0000
+++ b/sys/arch/mvme68k/dev/wdsc.c       Tue Nov 12 13:17:43 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: wdsc.c,v 1.32 2012/10/27 17:18:04 chs Exp $    */
+/*     $NetBSD: wdsc.c,v 1.33 2019/11/12 13:17:43 msaitoh Exp $        */
 
 /*
  * Copyright (c) 1982, 1990 The Regents of the University of California.
@@ -61,7 +61,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wdsc.c,v 1.32 2012/10/27 17:18:04 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wdsc.c,v 1.33 2019/11/12 13:17:43 msaitoh Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -125,6 +125,7 @@
        static struct evcnt evcnt;      /* XXXSCW: Temporary hack */
 
        sc = device_private(self);
+       sc->sc_dev = self;
        pa = aux;
 
        bus_space_map(pa->pa_bust, pa->pa_offset, 0x20, 0, &bush);
diff -r e07772ffbc0d -r 7f727c004256 sys/arch/next68k/dev/nextdisplay.c
--- a/sys/arch/next68k/dev/nextdisplay.c        Tue Nov 12 13:10:51 2019 +0000
+++ b/sys/arch/next68k/dev/nextdisplay.c        Tue Nov 12 13:17:43 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nextdisplay.c,v 1.21 2012/10/27 17:18:05 chs Exp $ */
+/* $NetBSD: nextdisplay.c,v 1.22 2019/11/12 13:17:44 msaitoh Exp $ */
 
 /*
  * Copyright (c) 1998 Matt DeBergalis
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nextdisplay.c,v 1.21 2012/10/27 17:18:05 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nextdisplay.c,v 1.22 2019/11/12 13:17:44 msaitoh Exp $");
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
@@ -234,6 +234,8 @@
        int iscolor;
        paddr_t addr;
 
+       sc->sc_dev = self;
+
        if (rom_machine_type == NeXT_WARP9C ||
            rom_machine_type == NeXT_TURBO_COLOR) {
                iscolor = 1;
diff -r e07772ffbc0d -r 7f727c004256 sys/dev/gpib/ct.c
--- a/sys/dev/gpib/ct.c Tue Nov 12 13:10:51 2019 +0000
+++ b/sys/dev/gpib/ct.c Tue Nov 12 13:17:43 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ct.c,v 1.30 2019/02/23 11:33:31 kamil Exp $ */
+/*     $NetBSD: ct.c,v 1.31 2019/11/12 13:17:44 msaitoh Exp $ */
 
 /*-
  * Copyright (c) 1996-2003 The NetBSD Foundation, Inc.
@@ -82,7 +82,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ct.c,v 1.30 2019/02/23 11:33:31 kamil Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ct.c,v 1.31 2019/11/12 13:17:44 msaitoh Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -260,6 +260,7 @@
        char name[7];
        int type, i, n, canstream = 0;
 
+       sc->sc_dev = self;
        sc->sc_ic = ca->ca_ic;
        sc->sc_slave = ca->ca_slave;
        sc->sc_punit = ca->ca_punit;
diff -r e07772ffbc0d -r 7f727c004256 sys/dev/gpib/mt.c
--- a/sys/dev/gpib/mt.c Tue Nov 12 13:10:51 2019 +0000
+++ b/sys/dev/gpib/mt.c Tue Nov 12 13:17:43 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mt.c,v 1.32 2019/02/24 20:54:13 kamil Exp $ */
+/*     $NetBSD: mt.c,v 1.33 2019/11/12 13:17:44 msaitoh Exp $ */
 
 /*-
  * Copyright (c) 1996-2003 The NetBSD Foundation, Inc.
@@ -75,7 +75,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mt.c,v 1.32 2019/02/24 20:54:13 kamil Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mt.c,v 1.33 2019/11/12 13:17:44 msaitoh Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -230,6 +230,7 @@
        struct cs80bus_attach_args *ca = aux;
        int type;
 
+       sc->sc_dev = self;
        sc->sc_ic = ca->ca_ic;
        sc->sc_slave = ca->ca_slave;
 
diff -r e07772ffbc0d -r 7f727c004256 sys/dev/gpib/ppi.c
--- a/sys/dev/gpib/ppi.c        Tue Nov 12 13:10:51 2019 +0000
+++ b/sys/dev/gpib/ppi.c        Tue Nov 12 13:17:43 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ppi.c,v 1.24 2018/09/03 16:29:30 riastradh Exp $       */
+/*     $NetBSD: ppi.c,v 1.25 2019/11/12 13:17:44 msaitoh Exp $ */
 
 /*-
  * Copyright (c) 1996-2003 The NetBSD Foundation, Inc.
@@ -65,7 +65,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ppi.c,v 1.24 2018/09/03 16:29:30 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ppi.c,v 1.25 2019/11/12 13:17:44 msaitoh Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -167,6 +167,7 @@
 
        printf("\n");
 
+       sc->sc_dev = self;
        sc->sc_ic = ga->ga_ic;
        sc->sc_address = ga->ga_address;
 
diff -r e07772ffbc0d -r 7f727c004256 sys/dev/isa/if_iy.c
--- a/sys/dev/isa/if_iy.c       Tue Nov 12 13:10:51 2019 +0000
+++ b/sys/dev/isa/if_iy.c       Tue Nov 12 13:17:43 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_iy.c,v 1.110 2019/09/13 07:55:06 msaitoh Exp $      */
+/*     $NetBSD: if_iy.c,v 1.111 2019/11/12 13:17:44 msaitoh Exp $      */
 /* #define IYDEBUG */
 /* #define IYMEMDEBUG */
 
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_iy.c,v 1.110 2019/09/13 07:55:06 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_iy.c,v 1.111 2019/11/12 13:17:44 msaitoh Exp $");
 
 #include "opt_inet.h"
 
@@ -282,6 +282,7 @@
        uint8_t myaddr[ETHER_ADDR_LEN];
        int eirq;
 
+       sc->sc_dev = self;
        iot = ia->ia_iot;
 
        if (bus_space_map(iot, ia->ia_io[0].ir_addr, 16, 0, &ioh)) {
diff -r e07772ffbc0d -r 7f727c004256 sys/dev/isa/mcd.c
--- a/sys/dev/isa/mcd.c Tue Nov 12 13:10:51 2019 +0000
+++ b/sys/dev/isa/mcd.c Tue Nov 12 13:17:43 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mcd.c,v 1.118 2019/02/24 20:50:03 kamil Exp $  */
+/*     $NetBSD: mcd.c,v 1.119 2019/11/12 13:17:44 msaitoh Exp $        */
 
 /*
  * Copyright (c) 1993, 1994, 1995 Charles M. Hannum.  All rights reserved.
@@ -56,7 +56,7 @@
 /*static char COPYRIGHT[] = "mcd-driver (C)1993 by H.Veit & B.Moore";*/
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mcd.c,v 1.118 2019/02/24 20:50:03 kamil Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mcd.c,v 1.119 2019/11/12 13:17:44 msaitoh Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -262,6 +262,7 @@
        bus_space_handle_t ioh;
        struct mcd_mbox mbx;
 
+       sc->sc_dev = self;
        aprint_naive("\n");
 
        /* Map i/o space */
diff -r e07772ffbc0d -r 7f727c004256 sys/dev/isa/tcic2_isa.c
--- a/sys/dev/isa/tcic2_isa.c   Tue Nov 12 13:10:51 2019 +0000
+++ b/sys/dev/isa/tcic2_isa.c   Tue Nov 12 13:17:43 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tcic2_isa.c,v 1.27 2016/07/14 10:19:06 msaitoh Exp $   */
+/*     $NetBSD: tcic2_isa.c,v 1.28 2019/11/12 13:17:44 msaitoh Exp $   */
 
 /*
  *
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tcic2_isa.c,v 1.27 2016/07/14 10:19:06 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tcic2_isa.c,v 1.28 2019/11/12 13:17:44 msaitoh Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -224,6 +224,7 @@
        bus_space_handle_t ioh;
        bus_space_handle_t memh;
 
+       sc->sc_dev = self;
        aprint_naive("\n");
 
        /* Map i/o space. */
diff -r e07772ffbc0d -r 7f727c004256 sys/dev/pci/neo.c
--- a/sys/dev/pci/neo.c Tue Nov 12 13:10:51 2019 +0000
+++ b/sys/dev/pci/neo.c Tue Nov 12 13:17:43 2019 +0000



Home | Main Index | Thread Index | Old Index