device_private(device_lookup()) -> device_lookup_private()
ok cube@
This commit is contained in:
parent
26a302aa36
commit
fc8fd752ef
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: audio.c,v 1.242 2008/06/08 18:18:33 tsutsui Exp $ */
|
||||
/* $NetBSD: audio.c,v 1.243 2008/06/10 22:53:08 cegger Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1991-1993 Regents of the University of California.
|
||||
|
@ -61,7 +61,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.242 2008/06/08 18:18:33 tsutsui Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.243 2008/06/10 22:53:08 cegger Exp $");
|
||||
|
||||
#include "audio.h"
|
||||
#if NAUDIO > 0
|
||||
|
@ -1005,7 +1005,7 @@ audioopen(dev_t dev, int flags, int ifmt, struct lwp *l)
|
|||
struct audio_softc *sc;
|
||||
int error;
|
||||
|
||||
sc = device_private(device_lookup(&audio_cd, AUDIOUNIT(dev)));
|
||||
sc = device_lookup_private(&audio_cd, AUDIOUNIT(dev));
|
||||
if (sc == NULL)
|
||||
return ENXIO;
|
||||
|
||||
|
@ -1043,7 +1043,7 @@ audioclose(dev_t dev, int flags, int ifmt, struct lwp *l)
|
|||
struct audio_softc *sc;
|
||||
int error;
|
||||
|
||||
sc = device_private(device_lookup(&audio_cd, AUDIOUNIT(dev)));
|
||||
sc = device_lookup_private(&audio_cd, AUDIOUNIT(dev));
|
||||
|
||||
device_active(sc->dev, DVA_SYSTEM);
|
||||
|
||||
|
@ -1074,7 +1074,7 @@ audioread(dev_t dev, struct uio *uio, int ioflag)
|
|||
struct audio_softc *sc;
|
||||
int error;
|
||||
|
||||
sc = device_private(device_lookup(&audio_cd, AUDIOUNIT(dev)));
|
||||
sc = device_lookup_private(&audio_cd, AUDIOUNIT(dev));
|
||||
if (sc == NULL)
|
||||
return ENXIO;
|
||||
|
||||
|
@ -1106,7 +1106,7 @@ audiowrite(dev_t dev, struct uio *uio, int ioflag)
|
|||
struct audio_softc *sc;
|
||||
int error;
|
||||
|
||||
sc = device_private(device_lookup(&audio_cd, AUDIOUNIT(dev)));
|
||||
sc = device_lookup_private(&audio_cd, AUDIOUNIT(dev));
|
||||
if (sc == NULL)
|
||||
return ENXIO;
|
||||
|
||||
|
@ -1138,7 +1138,7 @@ audioioctl(dev_t dev, u_long cmd, void *addr, int flag, struct lwp *l)
|
|||
struct audio_softc *sc;
|
||||
int error;
|
||||
|
||||
sc = device_private(device_lookup(&audio_cd, AUDIOUNIT(dev)));
|
||||
sc = device_lookup_private(&audio_cd, AUDIOUNIT(dev));
|
||||
if (sc->sc_dying)
|
||||
return EIO;
|
||||
|
||||
|
@ -1168,7 +1168,7 @@ audiopoll(dev_t dev, int events, struct lwp *l)
|
|||
struct audio_softc *sc;
|
||||
int revents;
|
||||
|
||||
sc = device_private(device_lookup(&audio_cd, AUDIOUNIT(dev)));
|
||||
sc = device_lookup_private(&audio_cd, AUDIOUNIT(dev));
|
||||
if (sc->sc_dying)
|
||||
return POLLHUP;
|
||||
|
||||
|
@ -1225,7 +1225,7 @@ audiommap(dev_t dev, off_t off, int prot)
|
|||
struct audio_softc *sc;
|
||||
paddr_t error;
|
||||
|
||||
sc = device_private(device_lookup(&audio_cd, AUDIOUNIT(dev)));
|
||||
sc = device_lookup_private(&audio_cd, AUDIOUNIT(dev));
|
||||
if (sc->sc_dying)
|
||||
return -1;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: lpt.c,v 1.74 2008/03/07 17:15:51 cube Exp $ */
|
||||
/* $NetBSD: lpt.c,v 1.75 2008/06/10 22:53:08 cegger Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1993, 1994 Charles M. Hannum.
|
||||
|
@ -54,7 +54,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: lpt.c,v 1.74 2008/03/07 17:15:51 cube Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: lpt.c,v 1.75 2008/06/10 22:53:08 cegger Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -151,7 +151,7 @@ lptopen(dev_t dev, int flag, int mode, struct lwp *l)
|
|||
int error;
|
||||
int spin;
|
||||
|
||||
sc = device_private(device_lookup(&lpt_cd, LPTUNIT(dev)));
|
||||
sc = device_lookup_private(&lpt_cd, LPTUNIT(dev));
|
||||
if (!sc || !sc->sc_dev_ok)
|
||||
return ENXIO;
|
||||
|
||||
|
@ -266,7 +266,7 @@ lptclose(dev_t dev, int flag, int mode,
|
|||
struct lwp *l)
|
||||
{
|
||||
struct lpt_softc *sc =
|
||||
device_private(device_lookup(&lpt_cd, LPTUNIT(dev)));
|
||||
device_lookup_private(&lpt_cd, LPTUNIT(dev));
|
||||
bus_space_tag_t iot = sc->sc_iot;
|
||||
bus_space_handle_t ioh = sc->sc_ioh;
|
||||
|
||||
|
@ -361,7 +361,7 @@ int
|
|||
lptwrite(dev_t dev, struct uio *uio, int flags)
|
||||
{
|
||||
struct lpt_softc *sc =
|
||||
device_private(device_lookup(&lpt_cd, LPTUNIT(dev)));
|
||||
device_lookup_private(&lpt_cd, LPTUNIT(dev));
|
||||
size_t n;
|
||||
int error = 0;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: irframe.c,v 1.41 2008/04/28 20:23:51 martin Exp $ */
|
||||
/* $NetBSD: irframe.c,v 1.42 2008/06/10 22:53:08 cegger Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2001 The NetBSD Foundation, Inc.
|
||||
|
@ -30,7 +30,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: irframe.c,v 1.41 2008/04/28 20:23:51 martin Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: irframe.c,v 1.42 2008/06/10 22:53:08 cegger Exp $");
|
||||
|
||||
#include "irframe.h"
|
||||
|
||||
|
@ -181,7 +181,7 @@ irframeopen(dev_t dev, int flag, int mode, struct lwp *l)
|
|||
struct irframe_softc *sc;
|
||||
int error;
|
||||
|
||||
sc = device_private(device_lookup(&irframe_cd, IRFRAMEUNIT(dev)));
|
||||
sc = device_lookup_private(&irframe_cd, IRFRAMEUNIT(dev));
|
||||
if (sc == NULL)
|
||||
return (ENXIO);
|
||||
if (!device_is_active(sc->sc_dev))
|
||||
|
@ -207,7 +207,7 @@ irframeclose(dev_t dev, int flag, int mode, struct lwp *l)
|
|||
struct irframe_softc *sc;
|
||||
int error;
|
||||
|
||||
sc = device_private(device_lookup(&irframe_cd, IRFRAMEUNIT(dev)));
|
||||
sc = device_lookup_private(&irframe_cd, IRFRAMEUNIT(dev));
|
||||
if (sc == NULL)
|
||||
return (ENXIO);
|
||||
sc->sc_open = 0;
|
||||
|
@ -223,7 +223,7 @@ irframeread(dev_t dev, struct uio *uio, int flag)
|
|||
{
|
||||
struct irframe_softc *sc;
|
||||
|
||||
sc = device_private(device_lookup(&irframe_cd, IRFRAMEUNIT(dev)));
|
||||
sc = device_lookup_private(&irframe_cd, IRFRAMEUNIT(dev));
|
||||
if (sc == NULL)
|
||||
return (ENXIO);
|
||||
if (!device_is_active(sc->sc_dev) || !sc->sc_open)
|
||||
|
@ -243,7 +243,7 @@ irframewrite(dev_t dev, struct uio *uio, int flag)
|
|||
{
|
||||
struct irframe_softc *sc;
|
||||
|
||||
sc = device_private(device_lookup(&irframe_cd, IRFRAMEUNIT(dev)));
|
||||
sc = device_lookup_private(&irframe_cd, IRFRAMEUNIT(dev));
|
||||
if (sc == NULL)
|
||||
return (ENXIO);
|
||||
if (!device_is_active(sc->sc_dev) || !sc->sc_open)
|
||||
|
@ -337,7 +337,7 @@ irframeioctl(dev_t dev, u_long cmd, void *addr, int flag,
|
|||
void *vaddr = addr;
|
||||
int error;
|
||||
|
||||
sc = device_private(device_lookup(&irframe_cd, IRFRAMEUNIT(dev)));
|
||||
sc = device_lookup_private(&irframe_cd, IRFRAMEUNIT(dev));
|
||||
if (sc == NULL)
|
||||
return (ENXIO);
|
||||
if (!device_is_active(sc->sc_dev) || !sc->sc_open)
|
||||
|
@ -377,7 +377,7 @@ irframepoll(dev_t dev, int events, struct lwp *l)
|
|||
{
|
||||
struct irframe_softc *sc;
|
||||
|
||||
sc = device_private(device_lookup(&irframe_cd, IRFRAMEUNIT(dev)));
|
||||
sc = device_lookup_private(&irframe_cd, IRFRAMEUNIT(dev));
|
||||
if (sc == NULL)
|
||||
return (POLLHUP);
|
||||
if (!device_is_active(sc->sc_dev) || !sc->sc_open)
|
||||
|
@ -391,7 +391,7 @@ irframekqfilter(dev_t dev, struct knote *kn)
|
|||
{
|
||||
struct irframe_softc *sc;
|
||||
|
||||
sc = device_private(device_lookup(&irframe_cd, IRFRAMEUNIT(dev)));
|
||||
sc = device_lookup_private(&irframe_cd, IRFRAMEUNIT(dev));
|
||||
if (!device_is_active(sc->sc_dev) || !sc->sc_open)
|
||||
return (1);
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: midi.c,v 1.66 2008/04/30 14:07:13 ad Exp $ */
|
||||
/* $NetBSD: midi.c,v 1.67 2008/06/10 22:53:08 cegger Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -31,7 +31,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: midi.c,v 1.66 2008/04/30 14:07:13 ad Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: midi.c,v 1.67 2008/06/10 22:53:08 cegger Exp $");
|
||||
|
||||
#include "midi.h"
|
||||
#include "sequencer.h"
|
||||
|
@ -814,7 +814,7 @@ midiopen(dev_t dev, int flags, int ifmt, struct lwp *l)
|
|||
const struct midi_hw_if *hw;
|
||||
int error;
|
||||
|
||||
sc = device_private(device_lookup(&midi_cd, MIDIUNIT(dev)));
|
||||
sc = device_lookup_private(&midi_cd, MIDIUNIT(dev));
|
||||
if (sc == NULL)
|
||||
return (ENXIO);
|
||||
if (sc->dying)
|
||||
|
@ -877,7 +877,7 @@ midiclose(dev_t dev, int flags, int ifmt,
|
|||
struct lwp *l)
|
||||
{
|
||||
struct midi_softc *sc =
|
||||
device_private(device_lookup(&midi_cd, MIDIUNIT(dev)));
|
||||
device_lookup_private(&midi_cd, MIDIUNIT(dev));
|
||||
const struct midi_hw_if *hw = sc->hw_if;
|
||||
int s, error;
|
||||
|
||||
|
@ -907,7 +907,7 @@ int
|
|||
midiread(dev_t dev, struct uio *uio, int ioflag)
|
||||
{
|
||||
struct midi_softc *sc =
|
||||
device_private(device_lookup(&midi_cd, MIDIUNIT(dev)));
|
||||
device_lookup_private(&midi_cd, MIDIUNIT(dev));
|
||||
struct midi_buffer *mb = &sc->inbuf;
|
||||
int error;
|
||||
int s;
|
||||
|
@ -1434,7 +1434,7 @@ int
|
|||
midiwrite(dev_t dev, struct uio *uio, int ioflag)
|
||||
{
|
||||
struct midi_softc *sc =
|
||||
device_private(device_lookup(&midi_cd, MIDIUNIT(dev)));
|
||||
device_lookup_private(&midi_cd, MIDIUNIT(dev));
|
||||
struct midi_buffer *mb = &sc->outbuf;
|
||||
int error;
|
||||
u_char inp[256];
|
||||
|
@ -1556,7 +1556,7 @@ int
|
|||
midi_writebytes(int unit, u_char *bf, int cc)
|
||||
{
|
||||
struct midi_softc *sc =
|
||||
device_private(device_lookup(&midi_cd, unit));
|
||||
device_lookup_private(&midi_cd, unit);
|
||||
|
||||
DPRINTFN(7, ("midi_writebytes: %p, unit=%d, cc=%d %#02x %#02x %#02x\n",
|
||||
sc, unit, cc, bf[0], bf[1], bf[2]));
|
||||
|
@ -1567,7 +1567,7 @@ int
|
|||
midiioctl(dev_t dev, u_long cmd, void *addr, int flag, struct lwp *l)
|
||||
{
|
||||
struct midi_softc *sc =
|
||||
device_private(device_lookup(&midi_cd, MIDIUNIT(dev)));
|
||||
device_lookup_private(&midi_cd, MIDIUNIT(dev));
|
||||
const struct midi_hw_if *hw = sc->hw_if;
|
||||
int error;
|
||||
int s;
|
||||
|
@ -1642,7 +1642,7 @@ int
|
|||
midipoll(dev_t dev, int events, struct lwp *l)
|
||||
{
|
||||
struct midi_softc *sc =
|
||||
device_private(device_lookup(&midi_cd, MIDIUNIT(dev)));
|
||||
device_lookup_private(&midi_cd, MIDIUNIT(dev));
|
||||
int revents = 0;
|
||||
int s;
|
||||
MIDI_BUF_DECLARE(idx);
|
||||
|
@ -1748,7 +1748,7 @@ int
|
|||
midikqfilter(dev_t dev, struct knote *kn)
|
||||
{
|
||||
struct midi_softc *sc =
|
||||
device_private(device_lookup(&midi_cd, MIDIUNIT(dev)));
|
||||
device_lookup_private(&midi_cd, MIDIUNIT(dev));
|
||||
struct klist *klist;
|
||||
int s;
|
||||
|
||||
|
@ -1781,7 +1781,7 @@ midi_getinfo(dev_t dev, struct midi_info *mi)
|
|||
{
|
||||
struct midi_softc *sc;
|
||||
|
||||
sc = device_private(device_lookup(&midi_cd, MIDIUNIT(dev)));
|
||||
sc = device_lookup_private(&midi_cd, MIDIUNIT(dev));
|
||||
if (sc == NULL)
|
||||
return;
|
||||
if (sc->dying)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: vnd.c,v 1.181 2008/05/05 13:41:30 ad Exp $ */
|
||||
/* $NetBSD: vnd.c,v 1.182 2008/06/10 22:53:08 cegger Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996, 1997, 1998, 2008 The NetBSD Foundation, Inc.
|
||||
|
@ -130,7 +130,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: vnd.c,v 1.181 2008/05/05 13:41:30 ad Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: vnd.c,v 1.182 2008/06/10 22:53:08 cegger Exp $");
|
||||
|
||||
#if defined(_KERNEL_OPT)
|
||||
#include "fs_nfs.h"
|
||||
|
@ -340,7 +340,7 @@ vndopen(dev_t dev, int flags, int mode, struct lwp *l)
|
|||
if (vnddebug & VDB_FOLLOW)
|
||||
printf("vndopen(0x%x, 0x%x, 0x%x, %p)\n", dev, flags, mode, l);
|
||||
#endif
|
||||
sc = device_private(device_lookup(&vnd_cd, unit));
|
||||
sc = device_lookup_private(&vnd_cd, unit);
|
||||
if (sc == NULL) {
|
||||
sc = vnd_spawn(unit);
|
||||
if (sc == NULL)
|
||||
|
@ -404,7 +404,7 @@ vndclose(dev_t dev, int flags, int mode, struct lwp *l)
|
|||
if (vnddebug & VDB_FOLLOW)
|
||||
printf("vndclose(0x%x, 0x%x, 0x%x, %p)\n", dev, flags, mode, l);
|
||||
#endif
|
||||
sc = device_private(device_lookup(&vnd_cd, unit));
|
||||
sc = device_lookup_private(&vnd_cd, unit);
|
||||
if (sc == NULL)
|
||||
return ENXIO;
|
||||
|
||||
|
@ -447,7 +447,7 @@ vndstrategy(struct buf *bp)
|
|||
{
|
||||
int unit = vndunit(bp->b_dev);
|
||||
struct vnd_softc *vnd =
|
||||
device_private(device_lookup(&vnd_cd, unit));
|
||||
device_lookup_private(&vnd_cd, unit);
|
||||
struct disklabel *lp = vnd->sc_dkdev.dk_label;
|
||||
daddr_t blkno;
|
||||
int s = splbio();
|
||||
|
@ -852,7 +852,7 @@ vndread(dev_t dev, struct uio *uio, int flags)
|
|||
printf("vndread(0x%x, %p)\n", dev, uio);
|
||||
#endif
|
||||
|
||||
sc = device_private(device_lookup(&vnd_cd, unit));
|
||||
sc = device_lookup_private(&vnd_cd, unit);
|
||||
if (sc == NULL)
|
||||
return ENXIO;
|
||||
|
||||
|
@ -874,7 +874,7 @@ vndwrite(dev_t dev, struct uio *uio, int flags)
|
|||
printf("vndwrite(0x%x, %p)\n", dev, uio);
|
||||
#endif
|
||||
|
||||
sc = device_private(device_lookup(&vnd_cd, unit));
|
||||
sc = device_lookup_private(&vnd_cd, unit);
|
||||
if (sc == NULL)
|
||||
return ENXIO;
|
||||
|
||||
|
@ -894,7 +894,7 @@ vnd_cget(struct lwp *l, int unit, int *un, struct vattr *va)
|
|||
if (*un < 0)
|
||||
return EINVAL;
|
||||
|
||||
vnd = device_private(device_lookup(&vnd_cd, *un));
|
||||
vnd = device_lookup_private(&vnd_cd, *un);
|
||||
if (vnd == NULL)
|
||||
return (*un >= vnd_cd.cd_ndevs) ? ENXIO : -1;
|
||||
|
||||
|
@ -925,7 +925,7 @@ vndioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l)
|
|||
printf("vndioctl(0x%x, 0x%lx, %p, 0x%x, %p): unit %d\n",
|
||||
dev, cmd, data, flag, l->l_proc, unit);
|
||||
#endif
|
||||
vnd = device_private(device_lookup(&vnd_cd, unit));
|
||||
vnd = device_lookup_private(&vnd_cd, unit);
|
||||
if (vnd == NULL &&
|
||||
#ifdef COMPAT_30
|
||||
cmd != VNDIOOCGET &&
|
||||
|
@ -1556,7 +1556,7 @@ vndsize(dev_t dev)
|
|||
int size;
|
||||
|
||||
unit = vndunit(dev);
|
||||
sc = device_private(device_lookup(&vnd_cd, unit));
|
||||
sc = device_lookup_private(&vnd_cd, unit);
|
||||
if (sc == NULL)
|
||||
return -1;
|
||||
|
||||
|
@ -1721,7 +1721,7 @@ compstrategy(struct buf *bp, off_t bn)
|
|||
int error;
|
||||
int unit = vndunit(bp->b_dev);
|
||||
struct vnd_softc *vnd =
|
||||
device_private(device_lookup(&vnd_cd, unit));
|
||||
device_lookup_private(&vnd_cd, unit);
|
||||
u_int32_t comp_block;
|
||||
struct uio auio;
|
||||
char *addr;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: if_tap.c,v 1.45 2008/05/28 06:28:12 dyoung Exp $ */
|
||||
/* $NetBSD: if_tap.c,v 1.46 2008/06/10 22:53:08 cegger Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2003, 2004, 2008 The NetBSD Foundation.
|
||||
|
@ -33,7 +33,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: if_tap.c,v 1.45 2008/05/28 06:28:12 dyoung Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: if_tap.c,v 1.46 2008/06/10 22:53:08 cegger Exp $");
|
||||
|
||||
#if defined(_KERNEL_OPT)
|
||||
#include "bpfilter.h"
|
||||
|
@ -682,7 +682,7 @@ tap_cdev_open(dev_t dev, int flags, int fmt, struct lwp *l)
|
|||
if (minor(dev) == TAP_CLONER)
|
||||
return tap_dev_cloner(l);
|
||||
|
||||
sc = device_private(device_lookup(&tap_cd, minor(dev)));
|
||||
sc = device_lookup_private(&tap_cd, minor(dev));
|
||||
if (sc == NULL)
|
||||
return (ENXIO);
|
||||
|
||||
|
@ -751,7 +751,7 @@ tap_cdev_close(dev_t dev, int flags, int fmt,
|
|||
struct lwp *l)
|
||||
{
|
||||
struct tap_softc *sc =
|
||||
device_private(device_lookup(&tap_cd, minor(dev)));
|
||||
device_lookup_private(&tap_cd, minor(dev));
|
||||
|
||||
if (sc == NULL)
|
||||
return (ENXIO);
|
||||
|
@ -772,7 +772,7 @@ tap_fops_close(file_t *fp)
|
|||
struct tap_softc *sc;
|
||||
int error;
|
||||
|
||||
sc = device_private(device_lookup(&tap_cd, unit));
|
||||
sc = device_lookup_private(&tap_cd, unit);
|
||||
if (sc == NULL)
|
||||
return (ENXIO);
|
||||
|
||||
|
@ -852,7 +852,7 @@ static int
|
|||
tap_dev_read(int unit, struct uio *uio, int flags)
|
||||
{
|
||||
struct tap_softc *sc =
|
||||
device_private(device_lookup(&tap_cd, unit));
|
||||
device_lookup_private(&tap_cd, unit);
|
||||
struct ifnet *ifp;
|
||||
struct mbuf *m, *n;
|
||||
int error = 0, s;
|
||||
|
@ -955,7 +955,7 @@ static int
|
|||
tap_dev_write(int unit, struct uio *uio, int flags)
|
||||
{
|
||||
struct tap_softc *sc =
|
||||
device_private(device_lookup(&tap_cd, unit));
|
||||
device_lookup_private(&tap_cd, unit);
|
||||
struct ifnet *ifp;
|
||||
struct mbuf *m, **mp;
|
||||
int error = 0;
|
||||
|
@ -1024,7 +1024,7 @@ static int
|
|||
tap_dev_ioctl(int unit, u_long cmd, void *data, struct lwp *l)
|
||||
{
|
||||
struct tap_softc *sc =
|
||||
device_private(device_lookup(&tap_cd, unit));
|
||||
device_lookup_private(&tap_cd, unit);
|
||||
int error = 0;
|
||||
|
||||
if (sc == NULL)
|
||||
|
@ -1100,7 +1100,7 @@ static int
|
|||
tap_dev_poll(int unit, int events, struct lwp *l)
|
||||
{
|
||||
struct tap_softc *sc =
|
||||
device_private(device_lookup(&tap_cd, unit));
|
||||
device_lookup_private(&tap_cd, unit);
|
||||
int revents = 0;
|
||||
|
||||
if (sc == NULL)
|
||||
|
@ -1149,7 +1149,7 @@ static int
|
|||
tap_dev_kqfilter(int unit, struct knote *kn)
|
||||
{
|
||||
struct tap_softc *sc =
|
||||
device_private(device_lookup(&tap_cd, unit));
|
||||
device_lookup_private(&tap_cd, unit);
|
||||
|
||||
if (sc == NULL)
|
||||
return (ENXIO);
|
||||
|
|
Loading…
Reference in New Issue