summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2004-02-21 21:10:55 +0000
committerphk <phk@FreeBSD.org>2004-02-21 21:10:55 +0000
commitad925439e08646e188eb1c0e0be355f0685c8739 (patch)
tree0896a7d99c90ad922a1e4b41f052d155256cb97e /sys/dev
parentd68e8ba04cb070f349043edccaafae5facffab48 (diff)
downloadFreeBSD-src-ad925439e08646e188eb1c0e0be355f0685c8739.zip
FreeBSD-src-ad925439e08646e188eb1c0e0be355f0685c8739.tar.gz
Device megapatch 4/6:
Introduce d_version field in struct cdevsw, this must always be initialized to D_VERSION. Flip sense of D_NOGIANT flag to D_NEEDGIANT, this involves removing four D_NOGIANT flags and adding 145 D_NEEDGIANT flags.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/aac/aac.c2
-rw-r--r--sys/dev/acpica/acpi.c2
-rw-r--r--sys/dev/adlink/adlink.c2
-rw-r--r--sys/dev/agp/agp.c2
-rw-r--r--sys/dev/amr/amr.c2
-rw-r--r--sys/dev/asr/asr.c2
-rw-r--r--sys/dev/ata/ata-all.c2
-rw-r--r--sys/dev/ata/atapi-tape.c3
-rw-r--r--sys/dev/atkbdc/psm.c2
-rw-r--r--sys/dev/bktr/bktr_os.c2
-rw-r--r--sys/dev/ciss/ciss.c3
-rw-r--r--sys/dev/cx/if_cx.c3
-rw-r--r--sys/dev/cy/cy.c3
-rw-r--r--sys/dev/cy/cy_isa.c3
-rw-r--r--sys/dev/dcons/dcons.c3
-rw-r--r--sys/dev/digi/digi.c3
-rw-r--r--sys/dev/drm/drm_drv.h3
-rw-r--r--sys/dev/fb/fb.c2
-rw-r--r--sys/dev/fdc/fdc.c3
-rw-r--r--sys/dev/firewire/fwdev.c6
-rw-r--r--sys/dev/hfa/fore_load.c2
-rw-r--r--sys/dev/ida/ida.c2
-rw-r--r--sys/dev/iicbus/iic.c2
-rw-r--r--sys/dev/iir/iir_ctrl.c2
-rw-r--r--sys/dev/ips/ips.c2
-rw-r--r--sys/dev/isp/isp_freebsd.c2
-rw-r--r--sys/dev/joy/joy.c2
-rw-r--r--sys/dev/kbd/kbd.c2
-rw-r--r--sys/dev/led/led.c2
-rw-r--r--sys/dev/matcd/matcd.c3
-rw-r--r--sys/dev/mcd/mcd.c4
-rw-r--r--sys/dev/md/md.c2
-rw-r--r--sys/dev/mlx/mlx.c3
-rw-r--r--sys/dev/mly/mly.c3
-rw-r--r--sys/dev/mse/mse.c2
-rw-r--r--sys/dev/nmdm/nmdm.c5
-rw-r--r--sys/dev/null/null.c5
-rw-r--r--sys/dev/ofw/ofw_console.c4
-rw-r--r--sys/dev/ofw/openfirmio.c2
-rw-r--r--sys/dev/ofw/openpromio.c2
-rw-r--r--sys/dev/pci/pci_user.c2
-rw-r--r--sys/dev/ppbus/lpt.c2
-rw-r--r--sys/dev/ppbus/pcfclock.c2
-rw-r--r--sys/dev/ppbus/ppi.c2
-rw-r--r--sys/dev/ppbus/pps.c2
-rw-r--r--sys/dev/raidframe/rf_freebsdkintf.c2
-rw-r--r--sys/dev/random/randomdev.c2
-rw-r--r--sys/dev/rc/rc.c3
-rw-r--r--sys/dev/rp/rp.c3
-rw-r--r--sys/dev/sab/sab.c3
-rw-r--r--sys/dev/scd/scd.c3
-rw-r--r--sys/dev/si/si.c3
-rw-r--r--sys/dev/sio/sio.c3
-rw-r--r--sys/dev/smbus/smb.c2
-rw-r--r--sys/dev/snp/snp.c2
-rw-r--r--sys/dev/sound/midi/midi.c2
-rw-r--r--sys/dev/sound/midi/sequencer.c2
-rw-r--r--sys/dev/sound/pcm/dsp.c2
-rw-r--r--sys/dev/sound/pcm/mixer.c2
-rw-r--r--sys/dev/sound/pcm/sndstat.c2
-rw-r--r--sys/dev/speaker/spkr.c2
-rw-r--r--sys/dev/streams/streams.c2
-rw-r--r--sys/dev/syscons/syscons.c6
-rw-r--r--sys/dev/syscons/sysmouse.c3
-rw-r--r--sys/dev/tdfx/tdfx_pci.c2
-rw-r--r--sys/dev/tga/tga_pci.c2
-rw-r--r--sys/dev/ti/if_ti.c2
-rw-r--r--sys/dev/twe/twe_freebsd.c2
-rw-r--r--sys/dev/uart/uart_tty.c3
-rw-r--r--sys/dev/usb/ucom.c3
-rw-r--r--sys/dev/usb/ufm.c2
-rw-r--r--sys/dev/usb/ugen.c2
-rw-r--r--sys/dev/usb/uhid.c2
-rw-r--r--sys/dev/usb/ulpt.c2
-rw-r--r--sys/dev/usb/ums.c2
-rw-r--r--sys/dev/usb/urio.c2
-rw-r--r--sys/dev/usb/usb.c2
-rw-r--r--sys/dev/usb/uscanner.c2
-rw-r--r--sys/dev/zs/zs.c3
79 files changed, 161 insertions, 37 deletions
diff --git a/sys/dev/aac/aac.c b/sys/dev/aac/aac.c
index 0d08883..77e18c8 100644
--- a/sys/dev/aac/aac.c
+++ b/sys/dev/aac/aac.c
@@ -181,6 +181,8 @@ static int aac_return_aif(struct aac_softc *sc, caddr_t uptr);
static int aac_query_disk(struct aac_softc *sc, caddr_t uptr);
static struct cdevsw aac_cdevsw = {
+ .d_version = D_VERSION,
+ .d_flags = D_NEEDGIANT,
.d_open = aac_open,
.d_close = aac_close,
.d_ioctl = aac_ioctl,
diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c
index 3c7b038..aefd7e9 100644
--- a/sys/dev/acpica/acpi.c
+++ b/sys/dev/acpica/acpi.c
@@ -67,6 +67,8 @@ static d_close_t acpiclose;
static d_ioctl_t acpiioctl;
static struct cdevsw acpi_cdevsw = {
+ .d_version = D_VERSION,
+ .d_flags = D_NEEDGIANT,
.d_open = acpiopen,
.d_close = acpiclose,
.d_ioctl = acpiioctl,
diff --git a/sys/dev/adlink/adlink.c b/sys/dev/adlink/adlink.c
index 909f2ba..f8a7253 100644
--- a/sys/dev/adlink/adlink.c
+++ b/sys/dev/adlink/adlink.c
@@ -393,6 +393,8 @@ adlink_intr(void *arg)
}
static struct cdevsw adlink_cdevsw = {
+ .d_version = D_VERSION,
+ .d_flags = D_NEEDGIANT,
.d_open = adlink_open,
.d_ioctl = adlink_ioctl,
.d_mmap = adlink_mmap,
diff --git a/sys/dev/agp/agp.c b/sys/dev/agp/agp.c
index 6f09660..6a01e20 100644
--- a/sys/dev/agp/agp.c
+++ b/sys/dev/agp/agp.c
@@ -70,6 +70,8 @@ static d_ioctl_t agp_ioctl;
static d_mmap_t agp_mmap;
static struct cdevsw agp_cdevsw = {
+ .d_version = D_VERSION,
+ .d_flags = D_NEEDGIANT,
.d_open = agp_open,
.d_close = agp_close,
.d_ioctl = agp_ioctl,
diff --git a/sys/dev/amr/amr.c b/sys/dev/amr/amr.c
index 8eece8e..0fce755 100644
--- a/sys/dev/amr/amr.c
+++ b/sys/dev/amr/amr.c
@@ -91,6 +91,8 @@ static d_close_t amr_close;
static d_ioctl_t amr_ioctl;
static struct cdevsw amr_cdevsw = {
+ .d_version = D_VERSION,
+ .d_flags = D_NEEDGIANT,
.d_open = amr_open,
.d_close = amr_close,
.d_ioctl = amr_ioctl,
diff --git a/sys/dev/asr/asr.c b/sys/dev/asr/asr.c
index 481ff30..2d2ba20 100644
--- a/sys/dev/asr/asr.c
+++ b/sys/dev/asr/asr.c
@@ -578,6 +578,8 @@ DATA_SET (mode0_pciset, mode0_pcidev);
*/
#define CDEV_MAJOR 154 /* preferred default character major */
STATIC struct cdevsw asr_cdevsw = {
+ .d_version = D_VERSION,
+ .d_flags = D_NEEDGIANT,
.d_open = asr_open,
.d_close = asr_close,
.d_ioctl = asr_ioctl,
diff --git a/sys/dev/ata/ata-all.c b/sys/dev/ata/ata-all.c
index bd59faf..27c2c13 100644
--- a/sys/dev/ata/ata-all.c
+++ b/sys/dev/ata/ata-all.c
@@ -59,6 +59,8 @@ __FBSDID("$FreeBSD$");
/* device structures */
static d_ioctl_t ata_ioctl;
static struct cdevsw ata_cdevsw = {
+ .d_version = D_VERSION,
+ .d_flags = D_NEEDGIANT,
.d_ioctl = ata_ioctl,
.d_name = "ata",
};
diff --git a/sys/dev/ata/atapi-tape.c b/sys/dev/ata/atapi-tape.c
index cd45cd0..aef27a6 100644
--- a/sys/dev/ata/atapi-tape.c
+++ b/sys/dev/ata/atapi-tape.c
@@ -53,6 +53,7 @@ static d_close_t ast_close;
static d_ioctl_t ast_ioctl;
static d_strategy_t ast_strategy;
static struct cdevsw ast_cdevsw = {
+ .d_version = D_VERSION,
.d_open = ast_open,
.d_close = ast_close,
.d_read = physread,
@@ -61,7 +62,7 @@ static struct cdevsw ast_cdevsw = {
.d_strategy = ast_strategy,
.d_name = "ast",
.d_maj = 119,
- .d_flags = D_TAPE | D_TRACKCLOSE | D_NOGIANT,
+ .d_flags = D_TAPE | D_TRACKCLOSE,
};
/* prototypes */
diff --git a/sys/dev/atkbdc/psm.c b/sys/dev/atkbdc/psm.c
index e886e8c..dd2fd7e 100644
--- a/sys/dev/atkbdc/psm.c
+++ b/sys/dev/atkbdc/psm.c
@@ -348,6 +348,8 @@ static driver_t psm_driver = {
static struct cdevsw psm_cdevsw = {
+ .d_version = D_VERSION,
+ .d_flags = D_NEEDGIANT,
.d_open = psmopen,
.d_close = psmclose,
.d_read = psmread,
diff --git a/sys/dev/bktr/bktr_os.c b/sys/dev/bktr/bktr_os.c
index 92c7fbe..be2ed08 100644
--- a/sys/dev/bktr/bktr_os.c
+++ b/sys/dev/bktr/bktr_os.c
@@ -258,6 +258,8 @@ static d_mmap_t bktr_mmap;
static d_poll_t bktr_poll;
static struct cdevsw bktr_cdevsw = {
+ .d_version = D_VERSION,
+ .d_flags = D_NEEDGIANT,
.d_open = bktr_open,
.d_close = bktr_close,
.d_read = bktr_read,
diff --git a/sys/dev/ciss/ciss.c b/sys/dev/ciss/ciss.c
index 843577d..9a4603c 100644
--- a/sys/dev/ciss/ciss.c
+++ b/sys/dev/ciss/ciss.c
@@ -212,8 +212,9 @@ static d_open_t ciss_open;
static d_close_t ciss_close;
static d_ioctl_t ciss_ioctl;
-
static struct cdevsw ciss_cdevsw = {
+ .d_version = D_VERSION,
+ .d_flags = D_NEEDGIANT,
.d_open = ciss_open,
.d_close = ciss_close,
.d_ioctl = ciss_ioctl,
diff --git a/sys/dev/cx/if_cx.c b/sys/dev/cx/if_cx.c
index 52fc80d..842348e 100644
--- a/sys/dev/cx/if_cx.c
+++ b/sys/dev/cx/if_cx.c
@@ -2550,6 +2550,7 @@ static struct cdevsw cx_cdevsw = {
};
#else /* __FreeBSD_version > 501000 */
static struct cdevsw cx_cdevsw = {
+ .d_version = D_VERSION,
.d_open = cx_open,
.d_close = cx_close,
.d_read = cx_read,
@@ -2557,7 +2558,7 @@ static struct cdevsw cx_cdevsw = {
.d_ioctl = cx_ioctl,
.d_name = "cx",
.d_maj = CDEV_MAJOR,
- .d_flags = D_TTY,
+ .d_flags = D_TTY | D_NEEDGIANT,
};
#endif
diff --git a/sys/dev/cy/cy.c b/sys/dev/cy/cy.c
index 2a715c0..7207846 100644
--- a/sys/dev/cy/cy.c
+++ b/sys/dev/cy/cy.c
@@ -386,12 +386,13 @@ static d_write_t siowrite;
static d_ioctl_t sioioctl;
static struct cdevsw sio_cdevsw = {
+ .d_version = D_VERSION,
.d_open = sioopen,
.d_close = sioclose,
.d_write = siowrite,
.d_ioctl = sioioctl,
.d_name = driver_name,
- .d_flags = D_TTY,
+ .d_flags = D_TTY | D_NEEDGIANT,
};
static int comconsole = -1;
diff --git a/sys/dev/cy/cy_isa.c b/sys/dev/cy/cy_isa.c
index 2a715c0..7207846 100644
--- a/sys/dev/cy/cy_isa.c
+++ b/sys/dev/cy/cy_isa.c
@@ -386,12 +386,13 @@ static d_write_t siowrite;
static d_ioctl_t sioioctl;
static struct cdevsw sio_cdevsw = {
+ .d_version = D_VERSION,
.d_open = sioopen,
.d_close = sioclose,
.d_write = siowrite,
.d_ioctl = sioioctl,
.d_name = driver_name,
- .d_flags = D_TTY,
+ .d_flags = D_TTY | D_NEEDGIANT,
};
static int comconsole = -1;
diff --git a/sys/dev/dcons/dcons.c b/sys/dev/dcons/dcons.c
index 8e67326..d798f84 100644
--- a/sys/dev/dcons/dcons.c
+++ b/sys/dev/dcons/dcons.c
@@ -88,11 +88,12 @@ static d_ioctl_t dcons_ioctl;
static struct cdevsw dcons_cdevsw = {
#if __FreeBSD_version >= 500104
+ .d_version = D_VERSION,
.d_open = dcons_open,
.d_close = dcons_close,
.d_ioctl = dcons_ioctl,
.d_name = "dcons",
- .d_flags = D_TTY,
+ .d_flags = D_TTY | D_NEEDGIANT,
#else
/* open */ dcons_open,
/* close */ dcons_close,
diff --git a/sys/dev/digi/digi.c b/sys/dev/digi/digi.c
index 87ebbef..e2cb568 100644
--- a/sys/dev/digi/digi.c
+++ b/sys/dev/digi/digi.c
@@ -142,13 +142,14 @@ const struct digi_control_signals digi_normal_signals = {
};
static struct cdevsw digi_sw = {
+ .d_version = D_VERSION,
.d_open = digiopen,
.d_close = digiclose,
.d_read = digiread,
.d_write = digiwrite,
.d_ioctl = digiioctl,
.d_name = driver_name,
- .d_flags = D_TTY,
+ .d_flags = D_TTY | D_NEEDGIANT,
};
static void
diff --git a/sys/dev/drm/drm_drv.h b/sys/dev/drm/drm_drv.h
index e0dfbcc..848794a 100644
--- a/sys/dev/drm/drm_drv.h
+++ b/sys/dev/drm/drm_drv.h
@@ -212,6 +212,7 @@ const char *DRM(find_description)(int vendor, int device);
#ifdef __FreeBSD__
static struct cdevsw DRM(cdevsw) = {
+ .d_version = D_VERSION,
.d_open = DRM( open ),
.d_close = DRM( close ),
.d_read = DRM( read ),
@@ -219,7 +220,7 @@ static struct cdevsw DRM(cdevsw) = {
.d_poll = DRM( poll ),
.d_mmap = DRM( mmap ),
.d_name = DRIVER_NAME,
- .d_flags = D_TRACKCLOSE,
+ .d_flags = D_TRACKCLOSE | D_NEEDGIANT,
#if __FreeBSD_version < 500000
.d_bmaj = -1
#endif
diff --git a/sys/dev/fb/fb.c b/sys/dev/fb/fb.c
index 5ce6708..38b9670 100644
--- a/sys/dev/fb/fb.c
+++ b/sys/dev/fb/fb.c
@@ -363,6 +363,8 @@ static d_mmap_t fbmmap;
static struct cdevsw fb_cdevsw = {
+ .d_version = D_VERSION,
+ .d_flags = D_NEEDGIANT,
.d_open = fbopen,
.d_close = fbclose,
.d_read = fbread,
diff --git a/sys/dev/fdc/fdc.c b/sys/dev/fdc/fdc.c
index 5a50633..808c537 100644
--- a/sys/dev/fdc/fdc.c
+++ b/sys/dev/fdc/fdc.c
@@ -482,6 +482,7 @@ fdin_rd(fdc_p fdc)
}
static struct cdevsw fd_cdevsw = {
+ .d_version = D_VERSION,
.d_open = fdopen,
.d_close = fdclose,
.d_read = physread,
@@ -489,7 +490,7 @@ static struct cdevsw fd_cdevsw = {
.d_ioctl = fdioctl,
.d_strategy = fdstrategy,
.d_name = "fd",
- .d_flags = D_DISK,
+ .d_flags = D_DISK | D_NEEDGIANT,
};
/*
diff --git a/sys/dev/firewire/fwdev.c b/sys/dev/firewire/fwdev.c
index 9a34ff9..b5a7d5d 100644
--- a/sys/dev/firewire/fwdev.c
+++ b/sys/dev/firewire/fwdev.c
@@ -73,9 +73,9 @@ static d_write_t fw_write;
static d_mmap_t fw_mmap;
static d_strategy_t fw_strategy;
-struct cdevsw firewire_cdevsw =
-{
+struct cdevsw firewire_cdevsw = {
#if __FreeBSD_version >= 500104
+ .d_version = D_VERSION,
.d_open = fw_open,
.d_close = fw_close,
.d_read = fw_read,
@@ -85,7 +85,7 @@ struct cdevsw firewire_cdevsw =
.d_mmap = fw_mmap,
.d_strategy = fw_strategy,
.d_name = "fw",
- .d_flags = D_MEM
+ .d_flags = D_MEM | D_NEEDGIANT
#else
fw_open, fw_close, fw_read, fw_write, fw_ioctl,
fw_poll, fw_mmap, fw_strategy, "fw", CDEV_MAJOR,
diff --git a/sys/dev/hfa/fore_load.c b/sys/dev/hfa/fore_load.c
index fffdf65..77ddaae 100644
--- a/sys/dev/hfa/fore_load.c
+++ b/sys/dev/hfa/fore_load.c
@@ -505,6 +505,8 @@ fore_reset(fup)
* Driver entry points
*/
static struct cdevsw fore_cdev = {
+ .d_version = D_VERSION,
+ .d_flags = D_NEEDGIANT,
.d_maj = -1,
};
diff --git a/sys/dev/ida/ida.c b/sys/dev/ida/ida.c
index db4813e..47f27a7 100644
--- a/sys/dev/ida/ida.c
+++ b/sys/dev/ida/ida.c
@@ -66,6 +66,8 @@ static int ida_wait(struct ida_softc *ida, struct ida_qcb *qcb);
static d_ioctl_t ida_ioctl;
static struct cdevsw ida_cdevsw = {
+ .d_version = D_VERSION,
+ .d_flags = D_NEEDGIANT,
.d_ioctl = ida_ioctl,
.d_name = "ida",
};
diff --git a/sys/dev/iicbus/iic.c b/sys/dev/iicbus/iic.c
index 0951f1f..7f4221a 100644
--- a/sys/dev/iicbus/iic.c
+++ b/sys/dev/iicbus/iic.c
@@ -93,6 +93,8 @@ static d_read_t iicread;
static d_ioctl_t iicioctl;
static struct cdevsw iic_cdevsw = {
+ .d_version = D_VERSION,
+ .d_flags = D_NEEDGIANT,
.d_open = iicopen,
.d_close = iicclose,
.d_read = iicread,
diff --git a/sys/dev/iir/iir_ctrl.c b/sys/dev/iir/iir_ctrl.c
index 8417595..9aeb099 100644
--- a/sys/dev/iir/iir_ctrl.c
+++ b/sys/dev/iir/iir_ctrl.c
@@ -70,6 +70,8 @@ static d_ioctl_t iir_ioctl;
/* Normally, this is a static structure. But we need it in pci/iir_pci.c */
static struct cdevsw iir_cdevsw = {
+ .d_version = D_VERSION,
+ .d_flags = D_NEEDGIANT,
.d_open = iir_open,
.d_close = iir_close,
.d_read = iir_read,
diff --git a/sys/dev/ips/ips.c b/sys/dev/ips/ips.c
index 9b076d2..d735f83 100644
--- a/sys/dev/ips/ips.c
+++ b/sys/dev/ips/ips.c
@@ -38,6 +38,8 @@ static d_close_t ips_close;
static d_ioctl_t ips_ioctl;
static struct cdevsw ips_cdevsw = {
+ .d_version = D_VERSION,
+ .d_flags = D_NEEDGIANT,
.d_open = ips_open,
.d_close = ips_close,
.d_ioctl = ips_ioctl,
diff --git a/sys/dev/isp/isp_freebsd.c b/sys/dev/isp/isp_freebsd.c
index e7526ab..460d430 100644
--- a/sys/dev/isp/isp_freebsd.c
+++ b/sys/dev/isp/isp_freebsd.c
@@ -53,6 +53,8 @@ static void isp_action(struct cam_sim *, union ccb *);
static struct cdevsw isp_cdevsw = {
+ .d_version = D_VERSION,
+ .d_flags = D_NEEDGIANT,
.d_ioctl = ispioctl,
.d_name = "isp",
};
diff --git a/sys/dev/joy/joy.c b/sys/dev/joy/joy.c
index 2ef286b..4746e77 100644
--- a/sys/dev/joy/joy.c
+++ b/sys/dev/joy/joy.c
@@ -69,6 +69,8 @@ static d_read_t joyread;
static d_ioctl_t joyioctl;
static struct cdevsw joy_cdevsw = {
+ .d_version = D_VERSION,
+ .d_flags = D_NEEDGIANT,
.d_open = joyopen,
.d_close = joyclose,
.d_read = joyread,
diff --git a/sys/dev/kbd/kbd.c b/sys/dev/kbd/kbd.c
index e7a67db..485ce70 100644
--- a/sys/dev/kbd/kbd.c
+++ b/sys/dev/kbd/kbd.c
@@ -433,6 +433,8 @@ static d_poll_t genkbdpoll;
static struct cdevsw kbd_cdevsw = {
+ .d_version = D_VERSION,
+ .d_flags = D_NEEDGIANT,
.d_open = genkbdopen,
.d_close = genkbdclose,
.d_read = genkbdread,
diff --git a/sys/dev/led/led.c b/sys/dev/led/led.c
index 77c68ef..7177547 100644
--- a/sys/dev/led/led.c
+++ b/sys/dev/led/led.c
@@ -211,6 +211,8 @@ led_write(dev_t dev, struct uio *uio, int ioflag)
}
static struct cdevsw led_cdevsw = {
+ .d_version = D_VERSION,
+ .d_flags = D_NEEDGIANT,
.d_write = led_write,
.d_name = "LED",
};
diff --git a/sys/dev/matcd/matcd.c b/sys/dev/matcd/matcd.c
index bc57012..9e28d25 100644
--- a/sys/dev/matcd/matcd.c
+++ b/sys/dev/matcd/matcd.c
@@ -740,6 +740,7 @@ static int matcd_pitch(int ldrive, int cdrive, int controller,
---------------------------------------------------------------------------*/
static struct cdevsw matcd_cdevsw = {
+ .d_version = D_VERSION,
.d_open = matcdopen, /* open */
.d_close = matcdclose, /* close */
.d_read = physread, /* read */
@@ -750,7 +751,7 @@ static struct cdevsw matcd_cdevsw = {
.d_strategy = matcdstrategy, /* strategy */
.d_name = "matcd", /* name */
.d_maj = RAW_DEVICE, /* maj */
- .d_flags = D_DISK, /* flags */
+ .d_flags = D_DISK | D_NEEDGIANT,
};
diff --git a/sys/dev/mcd/mcd.c b/sys/dev/mcd/mcd.c
index 285d57d..ebc233e 100644
--- a/sys/dev/mcd/mcd.c
+++ b/sys/dev/mcd/mcd.c
@@ -160,15 +160,15 @@ static d_close_t mcdclose;
static d_ioctl_t mcdioctl;
static d_strategy_t mcdstrategy;
-
static struct cdevsw mcd_cdevsw = {
+ .d_version = D_VERSION,
.d_open = mcdopen,
.d_close = mcdclose,
.d_read = physread,
.d_ioctl = mcdioctl,
.d_strategy = mcdstrategy,
.d_name = "mcd",
- .d_flags = D_DISK,
+ .d_flags = D_DISK | D_NEEDGIANT,
};
#define MCD_RETRYS 5
diff --git a/sys/dev/md/md.c b/sys/dev/md/md.c
index b0f1795..9b68ce2 100644
--- a/sys/dev/md/md.c
+++ b/sys/dev/md/md.c
@@ -116,6 +116,8 @@ static dev_t status_dev = 0;
static d_ioctl_t mdctlioctl;
static struct cdevsw mdctl_cdevsw = {
+ .d_version = D_VERSION,
+ .d_flags = D_NEEDGIANT,
.d_ioctl = mdctlioctl,
.d_name = MD_NAME,
};
diff --git a/sys/dev/mlx/mlx.c b/sys/dev/mlx/mlx.c
index bf9412c..67d1b2b 100644
--- a/sys/dev/mlx/mlx.c
+++ b/sys/dev/mlx/mlx.c
@@ -53,8 +53,9 @@
#include <dev/mlx/mlxvar.h>
#include <dev/mlx/mlxreg.h>
-
static struct cdevsw mlx_cdevsw = {
+ .d_version = D_VERSION,
+ .d_flags = D_NEEDGIANT,
.d_open = mlx_open,
.d_close = mlx_close,
.d_ioctl = mlx_ioctl,
diff --git a/sys/dev/mly/mly.c b/sys/dev/mly/mly.c
index 6dacf27..5f4c1ec 100644
--- a/sys/dev/mly/mly.c
+++ b/sys/dev/mly/mly.c
@@ -149,8 +149,9 @@ static driver_t mly_pci_driver = {
static devclass_t mly_devclass;
DRIVER_MODULE(mly, pci, mly_pci_driver, mly_devclass, 0, 0);
-
static struct cdevsw mly_cdevsw = {
+ .d_version = D_VERSION,
+ .d_flags = D_NEEDGIANT,
.d_open = mly_user_open,
.d_close = mly_user_close,
.d_ioctl = mly_user_ioctl,
diff --git a/sys/dev/mse/mse.c b/sys/dev/mse/mse.c
index b2c821b..8cd40f1 100644
--- a/sys/dev/mse/mse.c
+++ b/sys/dev/mse/mse.c
@@ -140,6 +140,8 @@ static d_ioctl_t mseioctl;
static d_poll_t msepoll;
static struct cdevsw mse_cdevsw = {
+ .d_version = D_VERSION,
+ .d_flags = D_NEEDGIANT,
.d_open = mseopen,
.d_close = mseclose,
.d_read = mseread,
diff --git a/sys/dev/nmdm/nmdm.c b/sys/dev/nmdm/nmdm.c
index 2762506..22b9b51 100644
--- a/sys/dev/nmdm/nmdm.c
+++ b/sys/dev/nmdm/nmdm.c
@@ -72,13 +72,14 @@ static d_write_t nmdmwrite;
static d_ioctl_t nmdmioctl;
static struct cdevsw nmdm_cdevsw = {
+ .d_version = D_VERSION,
.d_open = nmdmopen,
.d_close = nmdmclose,
.d_read = nmdmread,
.d_write = nmdmwrite,
.d_ioctl = nmdmioctl,
- .d_name = "nmdm",
- .d_flags = D_TTY | D_PSEUDO,
+ .d_name = "nmdn",
+ .d_flags = D_TTY | D_PSEUDO | D_NEEDGIANT,
};
#define BUFSIZ 100 /* Chunk size iomoved to/from user */
diff --git a/sys/dev/null/null.c b/sys/dev/null/null.c
index 84dae30..314f460 100644
--- a/sys/dev/null/null.c
+++ b/sys/dev/null/null.c
@@ -52,20 +52,21 @@ static d_read_t zero_read;
#define ZERO_MINOR 12
static struct cdevsw null_cdevsw = {
+ .d_version = D_VERSION,
.d_read = (d_read_t *)nullop,
.d_write = null_write,
.d_ioctl = null_ioctl,
.d_name = "null",
.d_maj = CDEV_MAJOR,
- .d_flags = D_NOGIANT,
};
static struct cdevsw zero_cdevsw = {
+ .d_version = D_VERSION,
.d_read = zero_read,
.d_write = null_write,
.d_name = "zero",
.d_maj = CDEV_MAJOR,
- .d_flags = D_MMAP_ANON | D_NOGIANT,
+ .d_flags = D_MMAP_ANON,
};
static void *zbuf;
diff --git a/sys/dev/ofw/ofw_console.c b/sys/dev/ofw/ofw_console.c
index dd55376..506b894 100644
--- a/sys/dev/ofw/ofw_console.c
+++ b/sys/dev/ofw/ofw_console.c
@@ -51,13 +51,13 @@ static d_open_t ofw_dev_open;
static d_close_t ofw_dev_close;
static d_ioctl_t ofw_dev_ioctl;
-
static struct cdevsw ofw_cdevsw = {
+ .d_version = D_VERSION,
.d_open = ofw_dev_open,
.d_close = ofw_dev_close,
.d_ioctl = ofw_dev_ioctl,
.d_name = "ofw",
- .d_flags = D_TTY,
+ .d_flags = D_TTY | D_NEEDGIANT,
};
static struct tty *ofw_tp = NULL;
diff --git a/sys/dev/ofw/openfirmio.c b/sys/dev/ofw/openfirmio.c
index 37f10b5..8d83022 100644
--- a/sys/dev/ofw/openfirmio.c
+++ b/sys/dev/ofw/openfirmio.c
@@ -67,6 +67,8 @@ static d_ioctl_t openfirm_ioctl;
#define OPENFIRM_MINOR 0
static struct cdevsw openfirm_cdevsw = {
+ .d_version = D_VERSION,
+ .d_flags = D_NEEDGIANT,
.d_ioctl = openfirm_ioctl,
.d_name = "openfirm",
};
diff --git a/sys/dev/ofw/openpromio.c b/sys/dev/ofw/openpromio.c
index d4c9851..5bf5e69 100644
--- a/sys/dev/ofw/openpromio.c
+++ b/sys/dev/ofw/openpromio.c
@@ -58,6 +58,8 @@ static int openprom_node_valid(phandle_t node);
static int openprom_node_search(phandle_t root, phandle_t node);
static struct cdevsw openprom_cdevsw = {
+ .d_version = D_VERSION,
+ .d_flags = D_NEEDGIANT,
.d_open = openprom_open,
.d_close = openprom_close,
.d_ioctl = openprom_ioctl,
diff --git a/sys/dev/pci/pci_user.c b/sys/dev/pci/pci_user.c
index 3c27978..0ce8da9 100644
--- a/sys/dev/pci/pci_user.c
+++ b/sys/dev/pci/pci_user.c
@@ -74,6 +74,8 @@ static d_ioctl_t pci_ioctl;
#endif
struct cdevsw pcicdev = {
+ .d_version = D_VERSION,
+ .d_flags = D_NEEDGIANT,
.d_open = pci_open,
.d_close = pci_close,
.d_ioctl = pci_ioctl,
diff --git a/sys/dev/ppbus/lpt.c b/sys/dev/ppbus/lpt.c
index 687e7ad..f0bdea7 100644
--- a/sys/dev/ppbus/lpt.c
+++ b/sys/dev/ppbus/lpt.c
@@ -190,6 +190,8 @@ static d_read_t lptread;
static d_ioctl_t lptioctl;
static struct cdevsw lpt_cdevsw = {
+ .d_version = D_VERSION,
+ .d_flags = D_NEEDGIANT,
.d_open = lptopen,
.d_close = lptclose,
.d_read = lptread,
diff --git a/sys/dev/ppbus/pcfclock.c b/sys/dev/ppbus/pcfclock.c
index bf0a01d..fd4c010 100644
--- a/sys/dev/ppbus/pcfclock.c
+++ b/sys/dev/ppbus/pcfclock.c
@@ -68,6 +68,8 @@ static d_close_t pcfclock_close;
static d_read_t pcfclock_read;
static struct cdevsw pcfclock_cdevsw = {
+ .d_version = D_VERSION,
+ .d_flags = D_NEEDGIANT,
.d_open = pcfclock_open,
.d_close = pcfclock_close,
.d_read = pcfclock_read,
diff --git a/sys/dev/ppbus/ppi.c b/sys/dev/ppbus/ppi.c
index c2783a6..7df5851 100644
--- a/sys/dev/ppbus/ppi.c
+++ b/sys/dev/ppbus/ppi.c
@@ -91,6 +91,8 @@ static d_write_t ppiwrite;
static d_read_t ppiread;
static struct cdevsw ppi_cdevsw = {
+ .d_version = D_VERSION,
+ .d_flags = D_NEEDGIANT,
.d_open = ppiopen,
.d_close = ppiclose,
.d_read = ppiread,
diff --git a/sys/dev/ppbus/pps.c b/sys/dev/ppbus/pps.c
index e7e1373..20a8b02 100644
--- a/sys/dev/ppbus/pps.c
+++ b/sys/dev/ppbus/pps.c
@@ -63,6 +63,8 @@ static d_close_t ppsclose;
static d_ioctl_t ppsioctl;
static struct cdevsw pps_cdevsw = {
+ .d_version = D_VERSION,
+ .d_flags = D_NEEDGIANT,
.d_open = ppsopen,
.d_close = ppsclose,
.d_ioctl = ppsioctl,
diff --git a/sys/dev/raidframe/rf_freebsdkintf.c b/sys/dev/raidframe/rf_freebsdkintf.c
index 78490f8..0dfc436 100644
--- a/sys/dev/raidframe/rf_freebsdkintf.c
+++ b/sys/dev/raidframe/rf_freebsdkintf.c
@@ -215,6 +215,8 @@ d_close_t raidctlclose;
d_ioctl_t raidctlioctl;
static struct cdevsw raidctl_cdevsw = {
+ .d_version = D_VERSION,
+ .d_flags = D_NEEDGIANT,
.d_open = raidctlopen,
.d_close = raidctlclose,
.d_ioctl = raidctlioctl,
diff --git a/sys/dev/random/randomdev.c b/sys/dev/random/randomdev.c
index d0e272e..bc5f166 100644
--- a/sys/dev/random/randomdev.c
+++ b/sys/dev/random/randomdev.c
@@ -64,6 +64,8 @@ static d_poll_t random_poll;
#define RANDOM_FIFO_MAX 256 /* How many events to queue up */
static struct cdevsw random_cdevsw = {
+ .d_version = D_VERSION,
+ .d_flags = D_NEEDGIANT,
.d_close = random_close,
.d_read = random_read,
.d_write = random_write,
diff --git a/sys/dev/rc/rc.c b/sys/dev/rc/rc.c
index e519177..b7a8e12 100644
--- a/sys/dev/rc/rc.c
+++ b/sys/dev/rc/rc.c
@@ -147,11 +147,12 @@ static d_close_t rcclose;
static d_ioctl_t rcioctl;
static struct cdevsw rc_cdevsw = {
+ .d_version = D_VERSION,
.d_open = rcopen,
.d_close = rcclose,
.d_ioctl = rcioctl,
.d_name = "rc",
- .d_flags = D_TTY,
+ .d_flags = D_TTY | D_NEEDGIANT,
};
static devclass_t rc_devclass;
diff --git a/sys/dev/rp/rp.c b/sys/dev/rp/rp.c
index 1088de2..3f9f49f 100644
--- a/sys/dev/rp/rp.c
+++ b/sys/dev/rp/rp.c
@@ -572,12 +572,13 @@ static d_write_t rpwrite;
static d_ioctl_t rpioctl;
struct cdevsw rp_cdevsw = {
+ .d_version = D_VERSION,
.d_open = rpopen,
.d_close = rpclose,
.d_write = rpwrite,
.d_ioctl = rpioctl,
.d_name = "rp",
- .d_flags = D_TTY,
+ .d_flags = D_TTY | D_NEEDGIANT,
};
static int rp_num_ports_open = 0;
diff --git a/sys/dev/sab/sab.c b/sys/dev/sab/sab.c
index 36b6c1f..af1bf13 100644
--- a/sys/dev/sab/sab.c
+++ b/sys/dev/sab/sab.c
@@ -161,11 +161,12 @@ static void sabttystop(struct tty *tp, int rw);
static int sabttyparam(struct tty *tp, struct termios *t);
static struct cdevsw sabtty_cdevsw = {
+ .d_version = D_VERSION,
.d_open = sabttyopen,
.d_close = sabttyclose,
.d_ioctl = sabttyioctl,
.d_name = "sabtty",
- .d_flags = D_TTY,
+ .d_flags = D_TTY | D_NEEDGIANT,
};
static device_method_t sab_methods[] = {
diff --git a/sys/dev/scd/scd.c b/sys/dev/scd/scd.c
index d455e09..2a66a00 100644
--- a/sys/dev/scd/scd.c
+++ b/sys/dev/scd/scd.c
@@ -147,13 +147,14 @@ static d_strategy_t scdstrategy;
static struct cdevsw scd_cdevsw = {
+ .d_version = D_VERSION,
.d_open = scdopen,
.d_close = scdclose,
.d_read = physread,
.d_ioctl = scdioctl,
.d_strategy = scdstrategy,
.d_name = "scd",
- .d_flags = D_DISK,
+ .d_flags = D_DISK | D_NEEDGIANT,
};
int
diff --git a/sys/dev/si/si.c b/sys/dev/si/si.c
index fa0d9db..1b76ad0 100644
--- a/sys/dev/si/si.c
+++ b/sys/dev/si/si.c
@@ -118,12 +118,13 @@ static d_write_t siwrite;
static d_ioctl_t siioctl;
static struct cdevsw si_cdevsw = {
+ .d_version = D_VERSION,
.d_open = siopen,
.d_close = siclose,
.d_write = siwrite,
.d_ioctl = siioctl,
.d_name = "si",
- .d_flags = D_TTY,
+ .d_flags = D_TTY | D_NEEDGIANT,
};
static int si_Nports;
diff --git a/sys/dev/sio/sio.c b/sys/dev/sio/sio.c
index 42c78b6..93ed290 100644
--- a/sys/dev/sio/sio.c
+++ b/sys/dev/sio/sio.c
@@ -323,13 +323,14 @@ static d_write_t siowrite;
static d_ioctl_t sioioctl;
static struct cdevsw sio_cdevsw = {
+ .d_version = D_VERSION,
.d_open = sioopen,
.d_close = sioclose,
.d_read = sioread,
.d_write = siowrite,
.d_ioctl = sioioctl,
.d_name = sio_driver_name,
- .d_flags = D_TTY,
+ .d_flags = D_TTY | D_NEEDGIANT,
};
int comconsole = -1;
diff --git a/sys/dev/smbus/smb.c b/sys/dev/smbus/smb.c
index 280bda5..85ab273 100644
--- a/sys/dev/smbus/smb.c
+++ b/sys/dev/smbus/smb.c
@@ -88,6 +88,8 @@ static d_read_t smbread;
static d_ioctl_t smbioctl;
static struct cdevsw smb_cdevsw = {
+ .d_version = D_VERSION,
+ .d_flags = D_NEEDGIANT,
.d_open = smbopen,
.d_close = smbclose,
.d_read = smbread,
diff --git a/sys/dev/snp/snp.c b/sys/dev/snp/snp.c
index 2c1c3c6..543a724 100644
--- a/sys/dev/snp/snp.c
+++ b/sys/dev/snp/snp.c
@@ -39,6 +39,8 @@ static d_ioctl_t snpioctl;
static d_poll_t snppoll;
static struct cdevsw snp_cdevsw = {
+ .d_version = D_VERSION,
+ .d_flags = D_NEEDGIANT,
.d_open = snpopen,
.d_close = snpclose,
.d_read = snpread,
diff --git a/sys/dev/sound/midi/midi.c b/sys/dev/sound/midi/midi.c
index 2da6415..a9d0184 100644
--- a/sys/dev/sound/midi/midi.c
+++ b/sys/dev/sound/midi/midi.c
@@ -70,6 +70,8 @@ static int midi_readstatus(char *buf, int *ptr, struct uio *uio);
#define CDEV_MAJOR MIDI_CDEV_MAJOR
static struct cdevsw midi_cdevsw = {
+ .d_version = D_VERSION,
+ .d_flags = D_NEEDGIANT,
.d_open = midiopen,
.d_close = midiclose,
.d_read = midiread,
diff --git a/sys/dev/sound/midi/sequencer.c b/sys/dev/sound/midi/sequencer.c
index 17c79ef..bea4936 100644
--- a/sys/dev/sound/midi/sequencer.c
+++ b/sys/dev/sound/midi/sequencer.c
@@ -135,6 +135,8 @@ static d_poll_t seqpoll;
#define CDEV_MAJOR SEQ_CDEV_MAJOR
static struct cdevsw seq_cdevsw = {
+ .d_version = D_VERSION,
+ .d_flags = D_NEEDGIANT,
.d_open = seqopen,
.d_close = seqclose,
.d_read = seqread,
diff --git a/sys/dev/sound/pcm/dsp.c b/sys/dev/sound/pcm/dsp.c
index cffbe6b..ac00603 100644
--- a/sys/dev/sound/pcm/dsp.c
+++ b/sys/dev/sound/pcm/dsp.c
@@ -42,6 +42,8 @@ static d_poll_t dsp_poll;
static d_mmap_t dsp_mmap;
struct cdevsw dsp_cdevsw = {
+ .d_version = D_VERSION,
+ .d_flags = D_NEEDGIANT,
.d_open = dsp_open,
.d_close = dsp_close,
.d_read = dsp_read,
diff --git a/sys/dev/sound/pcm/mixer.c b/sys/dev/sound/pcm/mixer.c
index 61d6c09..b5a67ed 100644
--- a/sys/dev/sound/pcm/mixer.c
+++ b/sys/dev/sound/pcm/mixer.c
@@ -73,6 +73,8 @@ static d_open_t mixer_open;
static d_close_t mixer_close;
static struct cdevsw mixer_cdevsw = {
+ .d_version = D_VERSION,
+ .d_flags = D_NEEDGIANT,
.d_open = mixer_open,
.d_close = mixer_close,
.d_ioctl = mixer_ioctl,
diff --git a/sys/dev/sound/pcm/sndstat.c b/sys/dev/sound/pcm/sndstat.c
index 77c63f3..e96a802 100644
--- a/sys/dev/sound/pcm/sndstat.c
+++ b/sys/dev/sound/pcm/sndstat.c
@@ -41,6 +41,8 @@ static d_close_t sndstat_close;
static d_read_t sndstat_read;
static struct cdevsw sndstat_cdevsw = {
+ .d_version = D_VERSION,
+ .d_flags = D_NEEDGIANT,
.d_open = sndstat_open,
.d_close = sndstat_close,
.d_read = sndstat_read,
diff --git a/sys/dev/speaker/spkr.c b/sys/dev/speaker/spkr.c
index e82ef46..e73ab8d 100644
--- a/sys/dev/speaker/spkr.c
+++ b/sys/dev/speaker/spkr.c
@@ -34,6 +34,8 @@ static d_write_t spkrwrite;
static d_ioctl_t spkrioctl;
static struct cdevsw spkr_cdevsw = {
+ .d_version = D_VERSION,
+ .d_flags = D_NEEDGIANT,
.d_open = spkropen,
.d_close = spkrclose,
.d_write = spkrwrite,
diff --git a/sys/dev/streams/streams.c b/sys/dev/streams/streams.c
index 8e5ac57..b67e39b 100644
--- a/sys/dev/streams/streams.c
+++ b/sys/dev/streams/streams.c
@@ -102,6 +102,8 @@ static struct fileops svr4_netops = {
};
static struct cdevsw streams_cdevsw = {
+ .d_version = D_VERSION,
+ .d_flags = D_NEEDGIANT,
.d_open = streamsopen,
.d_name = "streams",
};
diff --git a/sys/dev/syscons/syscons.c b/sys/dev/syscons/syscons.c
index f05de84..69ab21f 100644
--- a/sys/dev/syscons/syscons.c
+++ b/sys/dev/syscons/syscons.c
@@ -194,8 +194,6 @@ static int update_kbd_state(scr_stat *scp, int state, int mask);
static int update_kbd_leds(scr_stat *scp, int which);
static timeout_t blink_screen;
-#define CDEV_MAJOR 12
-
static cn_probe_t sccnprobe;
static cn_init_t sccninit;
static cn_getc_t sccngetc;
@@ -218,14 +216,14 @@ static d_ioctl_t scioctl;
static d_mmap_t scmmap;
static struct cdevsw sc_cdevsw = {
+ .d_version = D_VERSION,
.d_open = scopen,
.d_close = scclose,
.d_read = scread,
.d_ioctl = scioctl,
.d_mmap = scmmap,
.d_name = "sc",
- .d_maj = CDEV_MAJOR,
- .d_flags = D_TTY,
+ .d_flags = D_TTY | D_NEEDGIANT,
};
int
diff --git a/sys/dev/syscons/sysmouse.c b/sys/dev/syscons/sysmouse.c
index 08847a0..7aa72cf 100644
--- a/sys/dev/syscons/sysmouse.c
+++ b/sys/dev/syscons/sysmouse.c
@@ -49,11 +49,12 @@ static d_close_t smclose;
static d_ioctl_t smioctl;
static struct cdevsw sm_cdevsw = {
+ .d_version = D_VERSION,
.d_open = smopen,
.d_close = smclose,
.d_ioctl = smioctl,
.d_name = "sysmouse",
- .d_flags = D_TTY,
+ .d_flags = D_TTY | D_NEEDGIANT,
};
/* local variables */
diff --git a/sys/dev/tdfx/tdfx_pci.c b/sys/dev/tdfx/tdfx_pci.c
index dda1eb5..ac07d80 100644
--- a/sys/dev/tdfx/tdfx_pci.c
+++ b/sys/dev/tdfx/tdfx_pci.c
@@ -104,6 +104,8 @@ LINUX_IOCTL_SET(tdfx, LINUX_IOCTL_TDFX_MIN, LINUX_IOCTL_TDFX_MAX);
/* Char. Dev. file operations structure */
static struct cdevsw tdfx_cdev = {
+ .d_version = D_VERSION,
+ .d_flags = D_NEEDGIANT,
.d_open = tdfx_open,
.d_close = tdfx_close,
.d_ioctl = tdfx_ioctl,
diff --git a/sys/dev/tga/tga_pci.c b/sys/dev/tga/tga_pci.c
index f6f336d..902b7da 100644
--- a/sys/dev/tga/tga_pci.c
+++ b/sys/dev/tga/tga_pci.c
@@ -100,6 +100,8 @@ static struct gfb_type tga_devs[] = {
#ifdef FB_INSTALL_CDEV
static struct cdevsw tga_cdevsw = {
+ .d_version = D_VERSION,
+ .d_flags = D_NEEDGIANT,
.d_open = pcigfb_open,
.d_close = pcigfb_close,
.d_read = pcigfb_read,
diff --git a/sys/dev/ti/if_ti.c b/sys/dev/ti/if_ti.c
index 9e8c8f1..b0118d6 100644
--- a/sys/dev/ti/if_ti.c
+++ b/sys/dev/ti/if_ti.c
@@ -186,6 +186,8 @@ static d_close_t ti_close;
static d_ioctl_t ti_ioctl2;
static struct cdevsw ti_cdevsw = {
+ .d_version = D_VERSION,
+ .d_flags = D_NEEDGIANT,
.d_open = ti_open,
.d_close = ti_close,
.d_ioctl = ti_ioctl2,
diff --git a/sys/dev/twe/twe_freebsd.c b/sys/dev/twe/twe_freebsd.c
index 6a3a8ff..32175c1 100644
--- a/sys/dev/twe/twe_freebsd.c
+++ b/sys/dev/twe/twe_freebsd.c
@@ -67,6 +67,8 @@ static d_close_t twe_close;
static d_ioctl_t twe_ioctl_wrapper;
static struct cdevsw twe_cdevsw = {
+ .d_version = D_VERSION,
+ .d_flags = D_NEEDGIANT,
.d_open = twe_open,
.d_close = twe_close,
.d_ioctl = twe_ioctl_wrapper,
diff --git a/sys/dev/uart/uart_tty.c b/sys/dev/uart/uart_tty.c
index 66ce716..94ddb95 100644
--- a/sys/dev/uart/uart_tty.c
+++ b/sys/dev/uart/uart_tty.c
@@ -67,11 +67,12 @@ static d_close_t uart_tty_close;
static d_ioctl_t uart_tty_ioctl;
static struct cdevsw uart_cdevsw = {
+ .d_version = D_VERSION,
.d_open = uart_tty_open,
.d_close = uart_tty_close,
.d_ioctl = uart_tty_ioctl,
.d_name = uart_driver_name,
- .d_flags = D_TTY,
+ .d_flags = D_TTY | D_NEEDGIANT,
};
static struct uart_devinfo uart_console;
diff --git a/sys/dev/usb/ucom.c b/sys/dev/usb/ucom.c
index ad0a3d1..4bea235 100644
--- a/sys/dev/usb/ucom.c
+++ b/sys/dev/usb/ucom.c
@@ -128,13 +128,14 @@ Static d_ioctl_t ucomioctl;
static struct cdevsw ucom_cdevsw = {
+ .d_version = D_VERSION,
.d_open = ucomopen,
.d_close = ucomclose,
.d_read = ucomread,
.d_write = ucomwrite,
.d_ioctl = ucomioctl,
.d_name = "ucom",
- .d_flags = D_TTY,
+ .d_flags = D_TTY | D_NEEDGIANT,
#if __FreeBSD_version < 500014
.d_bmaj = -1,
#endif
diff --git a/sys/dev/usb/ufm.c b/sys/dev/usb/ufm.c
index 26916f1..db008ea 100644
--- a/sys/dev/usb/ufm.c
+++ b/sys/dev/usb/ufm.c
@@ -89,6 +89,8 @@ d_close_t ufmclose;
d_ioctl_t ufmioctl;
Static struct cdevsw ufm_cdevsw = {
+ .d_version = D_VERSION,
+ .d_flags = D_NEEDGIANT,
.d_open = ufmopen,
.d_close = ufmclose,
.d_ioctl = ufmioctl,
diff --git a/sys/dev/usb/ugen.c b/sys/dev/usb/ugen.c
index 408d14b..a907423 100644
--- a/sys/dev/usb/ugen.c
+++ b/sys/dev/usb/ugen.c
@@ -151,6 +151,8 @@ d_poll_t ugenpoll;
Static struct cdevsw ugen_cdevsw = {
+ .d_version = D_VERSION,
+ .d_flags = D_NEEDGIANT,
.d_open = ugenopen,
.d_close = ugenclose,
.d_read = ugenread,
diff --git a/sys/dev/usb/uhid.c b/sys/dev/usb/uhid.c
index ec46474..a574d1f 100644
--- a/sys/dev/usb/uhid.c
+++ b/sys/dev/usb/uhid.c
@@ -156,6 +156,8 @@ d_poll_t uhidpoll;
Static struct cdevsw uhid_cdevsw = {
+ .d_version = D_VERSION,
+ .d_flags = D_NEEDGIANT,
.d_open = uhidopen,
.d_close = uhidclose,
.d_read = uhidread,
diff --git a/sys/dev/usb/ulpt.c b/sys/dev/usb/ulpt.c
index 3dadd00..48aeb09 100644
--- a/sys/dev/usb/ulpt.c
+++ b/sys/dev/usb/ulpt.c
@@ -147,6 +147,8 @@ Static d_ioctl_t ulptioctl;
Static struct cdevsw ulpt_cdevsw = {
+ .d_version = D_VERSION,
+ .d_flags = D_NEEDGIANT,
.d_open = ulptopen,
.d_close = ulptclose,
.d_write = ulptwrite,
diff --git a/sys/dev/usb/ums.c b/sys/dev/usb/ums.c
index 4c0d598..2104ee3 100644
--- a/sys/dev/usb/ums.c
+++ b/sys/dev/usb/ums.c
@@ -154,6 +154,8 @@ Static d_poll_t ums_poll;
Static struct cdevsw ums_cdevsw = {
+ .d_version = D_VERSION,
+ .d_flags = D_NEEDGIANT,
.d_open = ums_open,
.d_close = ums_close,
.d_read = ums_read,
diff --git a/sys/dev/usb/urio.c b/sys/dev/usb/urio.c
index 57979cd..eaec4e5 100644
--- a/sys/dev/usb/urio.c
+++ b/sys/dev/usb/urio.c
@@ -117,6 +117,8 @@ d_ioctl_t urioioctl;
Static struct cdevsw urio_cdevsw = {
+ .d_version = D_VERSION,
+ .d_flags = D_NEEDGIANT,
.d_open = urioopen,
.d_close = urioclose,
.d_read = urioread,
diff --git a/sys/dev/usb/usb.c b/sys/dev/usb/usb.c
index 6ff8ed3..44a5544 100644
--- a/sys/dev/usb/usb.c
+++ b/sys/dev/usb/usb.c
@@ -146,6 +146,8 @@ d_ioctl_t usbioctl;
d_poll_t usbpoll;
struct cdevsw usb_cdevsw = {
+ .d_version = D_VERSION,
+ .d_flags = D_NEEDGIANT,
.d_open = usbopen,
.d_close = usbclose,
.d_read = usbread,
diff --git a/sys/dev/usb/uscanner.c b/sys/dev/usb/uscanner.c
index ab46721..02b8e0e 100644
--- a/sys/dev/usb/uscanner.c
+++ b/sys/dev/usb/uscanner.c
@@ -268,6 +268,8 @@ d_poll_t uscannerpoll;
Static struct cdevsw uscanner_cdevsw = {
+ .d_version = D_VERSION,
+ .d_flags = D_NEEDGIANT,
.d_open = uscanneropen,
.d_close = uscannerclose,
.d_read = uscannerread,
diff --git a/sys/dev/zs/zs.c b/sys/dev/zs/zs.c
index c3895a6..5f5ceb8 100644
--- a/sys/dev/zs/zs.c
+++ b/sys/dev/zs/zs.c
@@ -152,11 +152,12 @@ static void zsttystop(struct tty *tp, int rw);
static int zsttyparam(struct tty *tp, struct termios *t);
static struct cdevsw zstty_cdevsw = {
+ .d_version = D_VERSION,
.d_open = zsttyopen,
.d_close = zsttyclose,
.d_ioctl = zsttyioctl,
.d_name = "zstty",
- .d_flags = D_TTY,
+ .d_flags = D_TTY | D_NEEDGIANT,
};
static struct zstty_softc *zstty_cons;
OpenPOWER on IntegriCloud