Add missing initialization of sc_dev.

This commit is contained in:
msaitoh 2019-11-12 13:17:43 +00:00
parent bda26ac8c9
commit 6565c0bf2b
14 changed files with 44 additions and 30 deletions

View File

@ -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 @@ qnattach(device_t parent, device_t self, void *aux)
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;

View File

@ -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 @@ zsscmatch(device_t parent, cfdata_t cf, void *aux)
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);
/*

View File

@ -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 @@ fd_attach(device_t parent, device_t self, void *aux)
iwm = device_private(parent);
fd = device_private(self);
fd->sc_dev = self;
ia = aux;
driveInfo = iwmCheckDrive(ia->unit);

View File

@ -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 @@ wdsc_pcc_attach(device_t parent, device_t self, void *aux)
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);

View File

@ -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 @@ nextdisplay_attach(device_t parent, device_t self, void *aux)
int iscolor;
paddr_t addr;
sc->sc_dev = self;
if (rom_machine_type == NeXT_WARP9C ||
rom_machine_type == NeXT_TURBO_COLOR) {
iscolor = 1;

View File

@ -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 @@ ctattach(device_t parent, device_t self, void *aux)
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;

View File

@ -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 @@ mtattach(device_t parent, device_t self, void *aux)
struct cs80bus_attach_args *ca = aux;
int type;
sc->sc_dev = self;
sc->sc_ic = ca->ca_ic;
sc->sc_slave = ca->ca_slave;

View File

@ -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 @@ ppiattach(device_t parent, device_t self, void *aux)
printf("\n");
sc->sc_dev = self;
sc->sc_ic = ga->ga_ic;
sc->sc_address = ga->ga_address;

View File

@ -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 @@ iyattach(device_t parent, device_t self, void *aux)
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)) {

View File

@ -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 @@ mcdattach(device_t parent, device_t self, void *aux)
bus_space_handle_t ioh;
struct mcd_mbox mbx;
sc->sc_dev = self;
aprint_naive("\n");
/* Map i/o space */

View File

@ -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 @@ tcic_isa_attach(device_t parent, device_t self, void *aux)
bus_space_handle_t ioh;
bus_space_handle_t memh;
sc->sc_dev = self;
aprint_naive("\n");
/* Map i/o space. */

View File

@ -1,4 +1,4 @@
/* $NetBSD: neo.c,v 1.54 2019/06/08 08:02:38 isaki Exp $ */
/* $NetBSD: neo.c,v 1.55 2019/11/12 13:17:44 msaitoh Exp $ */
/*
* Copyright (c) 1999 Cameron Grant <gandalf@vilnya.demon.co.uk>
@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: neo.c,v 1.54 2019/06/08 08:02:38 isaki Exp $");
__KERNEL_RCSID(0, "$NetBSD: neo.c,v 1.55 2019/11/12 13:17:44 msaitoh Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -559,6 +559,7 @@ neo_attach(device_t parent, device_t self, void *aux)
char intrbuf[PCI_INTRSTR_LEN];
sc = device_private(self);
sc->dev = self;
pa = aux;
pc = pa->pa_pc;

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_tr_pcmcia.c,v 1.28 2019/01/08 08:47:21 msaitoh Exp $ */
/* $NetBSD: if_tr_pcmcia.c,v 1.29 2019/11/12 13:17:44 msaitoh Exp $ */
/*
* Copyright (c) 2000 Soren S. Jorvang. All rights reserved.
@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_tr_pcmcia.c,v 1.28 2019/01/08 08:47:21 msaitoh Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_tr_pcmcia.c,v 1.29 2019/11/12 13:17:44 msaitoh Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -124,6 +124,7 @@ tr_pcmcia_attach(device_t parent, device_t self, void *aux)
bus_size_t offset;
psc->sc_pf = pa->pf;
sc->sc_dev = self;
cfe = SIMPLEQ_FIRST(&pa->pf->cfe_head);

View File

@ -1,4 +1,4 @@
/* $NetBSD: sio16.c,v 1.24 2011/07/18 00:58:52 mrg Exp $ */
/* $NetBSD: sio16.c,v 1.25 2019/11/12 13:17:44 msaitoh Exp $ */
/*
* Copyright (c) 1998, 2001 Matthew R. Green
@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: sio16.c,v 1.24 2011/07/18 00:58:52 mrg Exp $");
__KERNEL_RCSID(0, "$NetBSD: sio16.c,v 1.25 2019/11/12 13:17:44 msaitoh Exp $");
#include <sys/param.h>
#include <sys/conf.h>
@ -286,6 +286,7 @@ clcd_attach(device_t parent, device_t self, void *aux)
struct cd18xx_softc *sc = device_private(self);
struct sio16_attach_args *args = aux;
sc->sc_dev = self;
sc->sc_tag = args->cd_tag;
sc->sc_handle = args->cd_handle;
sc->sc_osc = args->cd_osc;