Complete initializers, teach drivers that we moved from struct proc to
struct lwp, sprinkle some needed const qualifiers.
This commit is contained in:
parent
4cdd8aada6
commit
22974bb68b
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ct.c,v 1.8 2006/03/29 06:33:50 thorpej Exp $ */
|
||||
/* $NetBSD: ct.c,v 1.9 2007/01/13 18:46:37 cube Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996-2003 The NetBSD Foundation, Inc.
|
||||
@ -128,7 +128,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ct.c,v 1.8 2006/03/29 06:33:50 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ct.c,v 1.9 2007/01/13 18:46:37 cube Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -240,7 +240,7 @@ extern struct cfdriver ct_cd;
|
||||
struct ctinfo {
|
||||
short hwid;
|
||||
short punit;
|
||||
char *desc;
|
||||
const char *desc;
|
||||
} ctinfo[] = {
|
||||
{ CT7946ID, 1, "7946A" },
|
||||
{ CT7912PID, 1, "7912P" },
|
||||
@ -378,10 +378,10 @@ ctattach(parent, self, aux)
|
||||
|
||||
/*ARGSUSED*/
|
||||
int
|
||||
ctopen(dev, flag, type, p)
|
||||
ctopen(dev, flag, type, l)
|
||||
dev_t dev;
|
||||
int flag, type;
|
||||
struct proc *p;
|
||||
struct lwp *l;
|
||||
{
|
||||
struct ct_softc *sc;
|
||||
u_int8_t opt;
|
||||
@ -402,7 +402,7 @@ ctopen(dev, flag, type, p)
|
||||
sc->sc_punit, opt))
|
||||
return (EBUSY);
|
||||
|
||||
sc->sc_tpr = tprintf_open(p);
|
||||
sc->sc_tpr = tprintf_open(l->l_proc);
|
||||
sc->sc_flags |= CTF_OPEN;
|
||||
|
||||
return (0);
|
||||
@ -410,10 +410,10 @@ ctopen(dev, flag, type, p)
|
||||
|
||||
/*ARGSUSED*/
|
||||
int
|
||||
ctclose(dev, flag, fmt, p)
|
||||
ctclose(dev, flag, fmt, l)
|
||||
dev_t dev;
|
||||
int flag, fmt;
|
||||
struct proc *p;
|
||||
struct lwp *l;
|
||||
{
|
||||
struct ct_softc *sc;
|
||||
|
||||
@ -910,12 +910,12 @@ ctwrite(dev, uio, flags)
|
||||
|
||||
/*ARGSUSED*/
|
||||
int
|
||||
ctioctl(dev, cmd, data, flag, p)
|
||||
ctioctl(dev, cmd, data, flag, l)
|
||||
dev_t dev;
|
||||
u_long cmd;
|
||||
int flag;
|
||||
caddr_t data;
|
||||
struct proc *p;
|
||||
struct lwp *l;
|
||||
{
|
||||
struct mtop *op;
|
||||
int cnt;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: gpib.c,v 1.8 2006/03/29 06:33:50 thorpej Exp $ */
|
||||
/* $NetBSD: gpib.c,v 1.9 2007/01/13 18:46:37 cube Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2003 The NetBSD Foundation, Inc.
|
||||
@ -37,7 +37,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: gpib.c,v 1.8 2006/03/29 06:33:50 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: gpib.c,v 1.9 2007/01/13 18:46:37 cube Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -86,7 +86,7 @@ dev_type_poll(gpibpoll);
|
||||
|
||||
const struct cdevsw gpib_cdevsw = {
|
||||
gpibopen, gpibclose, gpibread, gpibwrite, gpibioctl,
|
||||
nostop, notty, gpibpoll, nommap, nokqfilter,
|
||||
nostop, notty, gpibpoll, nommap, nokqfilter, D_OTHER
|
||||
};
|
||||
|
||||
extern struct cfdriver gpib_cd;
|
||||
@ -175,7 +175,7 @@ gpibsubmatch1(parent, cf, ldesc, aux)
|
||||
}
|
||||
|
||||
int
|
||||
gpibsubmatch2(parent, cf, aux)
|
||||
gpibsubmatch2(parent, cf, ldesc, aux)
|
||||
struct device *parent;
|
||||
struct cfdata *cf;
|
||||
const int *ldesc;
|
||||
@ -525,10 +525,10 @@ recverror:
|
||||
*/
|
||||
|
||||
int
|
||||
gpibopen(dev, flags, mode, p)
|
||||
gpibopen(dev, flags, mode, l)
|
||||
dev_t dev;
|
||||
int flags, mode;
|
||||
struct proc *p;
|
||||
struct lwp *l;
|
||||
{
|
||||
struct gpib_softc *sc;
|
||||
|
||||
@ -546,10 +546,10 @@ gpibopen(dev, flags, mode, p)
|
||||
}
|
||||
|
||||
int
|
||||
gpibclose(dev, flag, mode, p)
|
||||
gpibclose(dev, flag, mode, l)
|
||||
dev_t dev;
|
||||
int flag, mode;
|
||||
struct proc *p;
|
||||
struct lwp *l;
|
||||
{
|
||||
struct gpib_softc *sc;
|
||||
|
||||
@ -599,12 +599,12 @@ gpibwrite(dev, uio, flags)
|
||||
}
|
||||
|
||||
int
|
||||
gpibioctl(dev, cmd, data, flag, p)
|
||||
gpibioctl(dev, cmd, data, flag, l)
|
||||
dev_t dev;
|
||||
u_long cmd;
|
||||
caddr_t data;
|
||||
int flag;
|
||||
struct proc *p;
|
||||
struct lwp *l;
|
||||
{
|
||||
struct gpib_softc *sc;
|
||||
|
||||
@ -625,10 +625,10 @@ gpibioctl(dev, cmd, data, flag, p)
|
||||
}
|
||||
|
||||
int
|
||||
gpibpoll(dev, events, p)
|
||||
gpibpoll(dev, events, l)
|
||||
dev_t dev;
|
||||
int events;
|
||||
struct proc *p;
|
||||
struct lwp *l;
|
||||
{
|
||||
struct gpib_softc *sc;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: mt.c,v 1.6 2006/03/29 06:33:50 thorpej Exp $ */
|
||||
/* $NetBSD: mt.c,v 1.7 2007/01/13 18:46:37 cube Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996-2003 The NetBSD Foundation, Inc.
|
||||
@ -121,7 +121,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: mt.c,v 1.6 2006/03/29 06:33:50 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: mt.c,v 1.7 2007/01/13 18:46:37 cube Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -220,7 +220,7 @@ extern struct cfdriver mt_cd;
|
||||
|
||||
struct mtinfo {
|
||||
u_short hwid;
|
||||
char *desc;
|
||||
const char *desc;
|
||||
} mtinfo[] = {
|
||||
{ MT7978ID, "7978" },
|
||||
{ MT7979AID, "7979A" },
|
||||
@ -374,10 +374,10 @@ getstats:
|
||||
}
|
||||
|
||||
int
|
||||
mtopen(dev, flag, mode, p)
|
||||
mtopen(dev, flag, mode, l)
|
||||
dev_t dev;
|
||||
int flag, mode;
|
||||
struct proc *p;
|
||||
struct lwp *l;
|
||||
{
|
||||
struct mt_softc *sc;
|
||||
int req_den;
|
||||
@ -394,7 +394,7 @@ mtopen(dev, flag, mode, p)
|
||||
sc->sc_flags));
|
||||
|
||||
sc->sc_flags |= MTF_OPEN;
|
||||
sc->sc_ttyp = tprintf_open(p);
|
||||
sc->sc_ttyp = tprintf_open(l->l_proc);
|
||||
if ((sc->sc_flags & MTF_ALIVE) == 0) {
|
||||
error = mtcommand(dev, MTRESET, 0);
|
||||
if (error != 0 || (sc->sc_flags & MTF_ALIVE) == 0)
|
||||
@ -480,10 +480,10 @@ errout:
|
||||
}
|
||||
|
||||
int
|
||||
mtclose(dev, flag, fmt, p)
|
||||
mtclose(dev, flag, fmt, l)
|
||||
dev_t dev;
|
||||
int flag, fmt;
|
||||
struct proc *p;
|
||||
struct lwp *l;
|
||||
{
|
||||
struct mt_softc *sc;
|
||||
|
||||
@ -576,7 +576,7 @@ mtstrategy(bp)
|
||||
}
|
||||
if (bp->b_bcount > s) {
|
||||
tprintf(sc->sc_ttyp,
|
||||
"%s: write record (%ld) too big: limit (%d)\n",
|
||||
"%s: write record (%d) too big: limit (%d)\n",
|
||||
sc->sc_dev.dv_xname, bp->b_bcount, s);
|
||||
#if 0 /* XXX see above */
|
||||
error:
|
||||
@ -995,7 +995,7 @@ mtintr(sc)
|
||||
sc->sc_dev.dv_xname, bp->b_bcount, bp->b_resid));
|
||||
} else {
|
||||
tprintf(sc->sc_ttyp,
|
||||
"%s: record (%d) larger than wanted (%ld)\n",
|
||||
"%s: record (%d) larger than wanted (%d)\n",
|
||||
sc->sc_dev.dv_xname, i, bp->b_bcount);
|
||||
error:
|
||||
sc->sc_flags &= ~MTF_IO;
|
||||
@ -1048,12 +1048,12 @@ mtwrite(dev, uio, flags)
|
||||
}
|
||||
|
||||
int
|
||||
mtioctl(dev, cmd, data, flag, p)
|
||||
mtioctl(dev, cmd, data, flag, l)
|
||||
dev_t dev;
|
||||
u_long cmd;
|
||||
caddr_t data;
|
||||
int flag;
|
||||
struct proc *p;
|
||||
struct lwp *l;
|
||||
{
|
||||
struct mtop *op;
|
||||
int cnt;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ppi.c,v 1.6 2006/03/29 06:33:50 thorpej Exp $ */
|
||||
/* $NetBSD: ppi.c,v 1.7 2007/01/13 18:46:37 cube Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996-2003 The NetBSD Foundation, Inc.
|
||||
@ -72,7 +72,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ppi.c,v 1.6 2006/03/29 06:33:50 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ppi.c,v 1.7 2007/01/13 18:46:37 cube Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -134,7 +134,7 @@ dev_type_ioctl(ppiioctl);
|
||||
|
||||
const struct cdevsw ppi_cdevsw = {
|
||||
ppiopen, ppiclose, ppiread, ppiwrite, ppiioctl,
|
||||
nostop, notty, nopoll, nommap, nokqfilter,
|
||||
nostop, notty, nopoll, nommap, nokqfilter, D_OTHER
|
||||
};
|
||||
|
||||
#define UNIT(x) minor(x)
|
||||
@ -185,10 +185,10 @@ ppiattach(parent, self, aux)
|
||||
}
|
||||
|
||||
int
|
||||
ppiopen(dev, flags, fmt, p)
|
||||
ppiopen(dev, flags, fmt, l)
|
||||
dev_t dev;
|
||||
int flags, fmt;
|
||||
struct proc *p;
|
||||
struct lwp *l;
|
||||
{
|
||||
int unit = UNIT(dev);
|
||||
struct ppi_softc *sc;
|
||||
@ -212,10 +212,10 @@ ppiopen(dev, flags, fmt, p)
|
||||
}
|
||||
|
||||
int
|
||||
ppiclose(dev, flags, fmt, p)
|
||||
ppiclose(dev, flags, fmt, l)
|
||||
dev_t dev;
|
||||
int flags, fmt;
|
||||
struct proc *p;
|
||||
struct lwp *l;
|
||||
{
|
||||
int unit = UNIT(dev);
|
||||
struct ppi_softc *sc = ppi_cd.cd_devs[unit];
|
||||
@ -448,12 +448,12 @@ again:
|
||||
}
|
||||
|
||||
int
|
||||
ppiioctl(dev, cmd, data, flag, p)
|
||||
ppiioctl(dev, cmd, data, flag, l)
|
||||
dev_t dev;
|
||||
u_long cmd;
|
||||
caddr_t data;
|
||||
int flag;
|
||||
struct proc *p;
|
||||
struct lwp *l;
|
||||
{
|
||||
struct ppi_softc *sc = ppi_cd.cd_devs[UNIT(dev)];
|
||||
struct ppiparam *pp, *upp;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: rd.c,v 1.13 2006/05/14 21:42:27 elad Exp $ */
|
||||
/* $NetBSD: rd.c,v 1.14 2007/01/13 18:46:37 cube Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996-2003 The NetBSD Foundation, Inc.
|
||||
@ -118,7 +118,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: rd.c,v 1.13 2006/05/14 21:42:27 elad Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: rd.c,v 1.14 2007/01/13 18:46:37 cube Exp $");
|
||||
|
||||
#include "rnd.h"
|
||||
|
||||
@ -210,7 +210,7 @@ int rderrthresh = RDRETRY-1; /* when to start reporting errors */
|
||||
const struct rdidentinfo {
|
||||
u_int16_t ri_hwid; /* 2 byte HW id */
|
||||
u_int16_t ri_maxunum; /* maximum allowed unit number */
|
||||
char *ri_desc; /* drive type description */
|
||||
const char *ri_desc; /* drive type description */
|
||||
int ri_nbpt; /* DEV_BSIZE blocks per track */
|
||||
int ri_ntpc; /* tracks per cylinder */
|
||||
int ri_ncyl; /* cylinders per unit */
|
||||
@ -508,10 +508,10 @@ rdgetinfo(sc)
|
||||
}
|
||||
|
||||
int
|
||||
rdopen(dev, flags, mode, p)
|
||||
rdopen(dev, flags, mode, l)
|
||||
dev_t dev;
|
||||
int flags, mode;
|
||||
struct proc *p;
|
||||
struct lwp *l;
|
||||
{
|
||||
struct rd_softc *sc;
|
||||
int error, mask, part;
|
||||
@ -564,10 +564,10 @@ rdopen(dev, flags, mode, p)
|
||||
}
|
||||
|
||||
int
|
||||
rdclose(dev, flag, mode, p)
|
||||
rdclose(dev, flag, mode, l)
|
||||
dev_t dev;
|
||||
int flag, mode;
|
||||
struct proc *p;
|
||||
struct lwp *l;
|
||||
{
|
||||
struct rd_softc *sc;
|
||||
struct disk *dk;
|
||||
@ -1032,12 +1032,12 @@ rdwrite(dev, uio, flags)
|
||||
}
|
||||
|
||||
int
|
||||
rdioctl(dev, cmd, data, flag, p)
|
||||
rdioctl(dev, cmd, data, flag, l)
|
||||
dev_t dev;
|
||||
u_long cmd;
|
||||
caddr_t data;
|
||||
int flag;
|
||||
struct proc *p;
|
||||
struct lwp *l;
|
||||
{
|
||||
struct rd_softc *sc;
|
||||
struct disklabel *lp;
|
||||
|
Loading…
Reference in New Issue
Block a user