summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/alpha/alpha/mem.c22
-rw-r--r--sys/alpha/alpha/promcons.c21
-rw-r--r--sys/alpha/tlsb/zs_tlsb.c21
-rw-r--r--sys/amd64/acpica/acpi_machdep.c20
-rw-r--r--sys/amd64/amd64/mem.c22
-rw-r--r--sys/cam/cam_xpt.c18
-rw-r--r--sys/cam/scsi/scsi_cd.c22
-rw-r--r--sys/cam/scsi/scsi_ch.c18
-rw-r--r--sys/cam/scsi/scsi_pass.c18
-rw-r--r--sys/cam/scsi/scsi_pt.c21
-rw-r--r--sys/cam/scsi/scsi_sa.c22
-rw-r--r--sys/cam/scsi/scsi_ses.c18
-rw-r--r--sys/cam/scsi/scsi_target.c24
-rw-r--r--sys/coda/coda_fbsd.c21
-rw-r--r--sys/contrib/ipfilter/netinet/mlfk_ipl.c19
-rw-r--r--sys/dev/aac/aac.c19
-rw-r--r--sys/dev/acpica/acpi.c18
-rw-r--r--sys/dev/agp/agp.c20
-rw-r--r--sys/dev/amr/amr.c18
-rw-r--r--sys/dev/asr/asr.c18
-rw-r--r--sys/dev/ata/ata-all.c18
-rw-r--r--sys/dev/ata/atapi-cd.c22
-rw-r--r--sys/dev/ata/atapi-tape.c22
-rw-r--r--sys/dev/atkbdc/psm.c20
-rw-r--r--sys/dev/bktr/bktr_os.c22
-rw-r--r--sys/dev/ccd/ccd.c18
-rw-r--r--sys/dev/ciss/ciss.c19
-rw-r--r--sys/dev/cy/cy.c24
-rw-r--r--sys/dev/cy/cy_isa.c24
-rw-r--r--sys/dev/dgb/dgb.c24
-rw-r--r--sys/dev/digi/digi.c24
-rw-r--r--sys/dev/drm/drm_drv.h25
-rw-r--r--sys/dev/fb/fb.c21
-rw-r--r--sys/dev/fdc/fdc.c22
-rw-r--r--sys/dev/firewire/fwdev.c23
-rw-r--r--sys/dev/hfa/fore_load.c14
-rw-r--r--sys/dev/iicbus/iic.c20
-rw-r--r--sys/dev/iir/iir_ctrl.c21
-rw-r--r--sys/dev/isp/isp_freebsd.c19
-rw-r--r--sys/dev/joy/joy.c19
-rw-r--r--sys/dev/kbd/kbd.c21
-rw-r--r--sys/dev/mcd/mcd.c21
-rw-r--r--sys/dev/md/md.c15
-rw-r--r--sys/dev/mlx/mlx.c18
-rw-r--r--sys/dev/mly/mly.c18
-rw-r--r--sys/dev/mse/mse.c20
-rw-r--r--sys/dev/nmdm/nmdm.c22
-rw-r--r--sys/dev/null/null.c42
-rw-r--r--sys/dev/ofw/ofw_console.c21
-rw-r--r--sys/dev/ofw/openfirmio.c19
-rw-r--r--sys/dev/pci/pci_user.c18
-rw-r--r--sys/dev/ppbus/lpt.c20
-rw-r--r--sys/dev/ppbus/pcfclock.c18
-rw-r--r--sys/dev/ppbus/ppi.c20
-rw-r--r--sys/dev/ppbus/pps.c18
-rw-r--r--sys/dev/raidframe/rf_freebsdkintf.c18
-rw-r--r--sys/dev/random/randomdev.c22
-rw-r--r--sys/dev/rc/rc.c24
-rw-r--r--sys/dev/rp/rp.c22
-rw-r--r--sys/dev/sab/sab.c24
-rw-r--r--sys/dev/scd/scd.c21
-rw-r--r--sys/dev/si/si.c24
-rw-r--r--sys/dev/sio/sio.c24
-rw-r--r--sys/dev/smbus/smb.c20
-rw-r--r--sys/dev/snp/snp.c21
-rw-r--r--sys/dev/sound/midi/midi.c21
-rw-r--r--sys/dev/sound/midi/sequencer.c21
-rw-r--r--sys/dev/sound/pcm/dsp.c22
-rw-r--r--sys/dev/sound/pcm/mixer.c18
-rw-r--r--sys/dev/sound/pcm/sndstat.c18
-rw-r--r--sys/dev/speaker/spkr.c19
-rw-r--r--sys/dev/streams/streams.c16
-rw-r--r--sys/dev/syscons/syscons.c25
-rw-r--r--sys/dev/syscons/sysmouse.c21
-rw-r--r--sys/dev/tdfx/tdfx_pci.c19
-rw-r--r--sys/dev/tga/tga_pci.c22
-rw-r--r--sys/dev/ti/if_ti.c18
-rw-r--r--sys/dev/twe/twe_freebsd.c18
-rw-r--r--sys/dev/usb/ucom.c24
-rw-r--r--sys/dev/usb/ufm.c18
-rw-r--r--sys/dev/usb/ugen.c21
-rw-r--r--sys/dev/usb/uhid.c21
-rw-r--r--sys/dev/usb/ulpt.c19
-rw-r--r--sys/dev/usb/ums.c20
-rw-r--r--sys/dev/usb/urio.c20
-rw-r--r--sys/dev/usb/usb.c20
-rw-r--r--sys/dev/usb/uscanner.c20
-rw-r--r--sys/dev/vinum/vinum.c22
-rw-r--r--sys/dev/zs/zs.c24
-rw-r--r--sys/fs/coda/coda_fbsd.c21
-rw-r--r--sys/geom/geom_ccd.c18
-rw-r--r--sys/geom/geom_dev.c23
-rw-r--r--sys/geom/geom_stats.c18
-rw-r--r--sys/i386/acpica/acpi_machdep.c20
-rw-r--r--sys/i386/apm/apm.c20
-rw-r--r--sys/i386/bios/apm.c20
-rw-r--r--sys/i386/bios/smapi.c20
-rw-r--r--sys/i386/i386/elan-mmcr.c20
-rw-r--r--sys/i386/i386/mem.c22
-rw-r--r--sys/i386/i386/perfmon.c18
-rw-r--r--sys/i386/isa/asc.c20
-rw-r--r--sys/i386/isa/ctx.c20
-rw-r--r--sys/i386/isa/cx.c24
-rw-r--r--sys/i386/isa/cy.c24
-rw-r--r--sys/i386/isa/gpib.c19
-rw-r--r--sys/i386/isa/gsc.c19
-rw-r--r--sys/i386/isa/istallion.c24
-rw-r--r--sys/i386/isa/loran.c19
-rw-r--r--sys/i386/isa/mse.c20
-rw-r--r--sys/i386/isa/pcaudio.c20
-rw-r--r--sys/i386/isa/pcvt/pcvt_drv.c25
-rw-r--r--sys/i386/isa/spic.c20
-rw-r--r--sys/i386/isa/spigot.c21
-rw-r--r--sys/i386/isa/spkr.c19
-rw-r--r--sys/i386/isa/stallion.c24
-rw-r--r--sys/i386/isa/tw.c20
-rw-r--r--sys/i386/isa/wt.c21
-rw-r--r--sys/i386/smapi/smapi.c20
-rw-r--r--sys/i4b/driver/i4b_ctl.c19
-rw-r--r--sys/i4b/driver/i4b_rbch.c21
-rw-r--r--sys/i4b/driver/i4b_tel.c21
-rw-r--r--sys/i4b/driver/i4b_trace.c20
-rw-r--r--sys/i4b/layer4/i4b_i4bdrv.c20
-rw-r--r--sys/ia64/ia64/mem.c22
-rw-r--r--sys/ia64/ia64/ssc.c21
-rw-r--r--sys/isa/fd.c22
-rw-r--r--sys/isa/psm.c20
-rw-r--r--sys/isa/vga_isa.c21
-rw-r--r--sys/kern/kern_conf.c26
-rw-r--r--sys/kern/kern_descrip.c16
-rw-r--r--sys/kern/subr_bus.c20
-rw-r--r--sys/kern/subr_log.c20
-rw-r--r--sys/kern/tty_cons.c24
-rw-r--r--sys/kern/tty_pty.c48
-rw-r--r--sys/kern/tty_tty.c18
-rw-r--r--sys/net/bpf.c21
-rw-r--r--sys/net/if.c21
-rw-r--r--sys/net/if_tap.c21
-rw-r--r--sys/net/if_tun.c21
-rw-r--r--sys/netgraph/ng_device.c21
-rw-r--r--sys/netncp/ncp_mod.c18
-rw-r--r--sys/netsmb/smb_dev.c18
-rw-r--r--sys/opencrypto/cryptodev.c21
-rw-r--r--sys/pc98/apm/apm.c20
-rw-r--r--sys/pc98/cbus/fdc.c22
-rw-r--r--sys/pc98/cbus/gdc.c21
-rw-r--r--sys/pc98/cbus/olpt.c19
-rw-r--r--sys/pc98/cbus/sio.c24
-rw-r--r--sys/pc98/pc98/fd.c22
-rw-r--r--sys/pc98/pc98/mse.c20
-rw-r--r--sys/pc98/pc98/olpt.c19
-rw-r--r--sys/pc98/pc98/pc98gdc.c21
-rw-r--r--sys/pc98/pc98/pcaudio.c20
-rw-r--r--sys/pc98/pc98/sio.c24
-rw-r--r--sys/pc98/pc98/spkr.c19
-rw-r--r--sys/pc98/pc98/syscons.c25
-rw-r--r--sys/pc98/pc98/wd_cd.c22
-rw-r--r--sys/pccard/pccard.c21
-rw-r--r--sys/pci/agp.c20
-rw-r--r--sys/pci/if_ti.c18
-rw-r--r--sys/pci/meteor.c21
-rw-r--r--sys/pci/xrpu.c19
-rw-r--r--sys/sparc64/sparc64/mem.c20
163 files changed, 1217 insertions, 2179 deletions
diff --git a/sys/alpha/alpha/mem.c b/sys/alpha/alpha/mem.c
index 18fb05e..48dd885 100644
--- a/sys/alpha/alpha/mem.c
+++ b/sys/alpha/alpha/mem.c
@@ -80,19 +80,15 @@ static d_mmap_t memmmap;
#define CDEV_MAJOR 2
static struct cdevsw mem_cdevsw = {
- /* open */ mmopen,
- /* close */ mmclose,
- /* read */ mmrw,
- /* write */ mmrw,
- /* ioctl */ mmioctl,
- /* poll */ (d_poll_t *)seltrue,
- /* mmap */ memmmap,
- /* strategy */ nostrategy,
- /* name */ "mem",
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ D_MEM,
+ .d_open = mmopen,
+ .d_close = mmclose,
+ .d_read = mmrw,
+ .d_write = mmrw,
+ .d_ioctl = mmioctl,
+ .d_mmap = memmmap,
+ .d_name = "mem",
+ .d_maj = CDEV_MAJOR,
+ .d_flags = D_MEM,
};
struct mem_range_softc mem_range_softc;
diff --git a/sys/alpha/alpha/promcons.c b/sys/alpha/alpha/promcons.c
index 6445625..6453381 100644
--- a/sys/alpha/alpha/promcons.c
+++ b/sys/alpha/alpha/promcons.c
@@ -64,19 +64,14 @@ static d_ioctl_t promioctl;
#define CDEV_MAJOR 97
static struct cdevsw prom_cdevsw = {
- /* open */ promopen,
- /* close */ promclose,
- /* read */ ttyread,
- /* write */ ttywrite,
- /* ioctl */ promioctl,
- /* poll */ ttypoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "prom",
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = promopen,
+ .d_close = promclose,
+ .d_read = ttyread,
+ .d_write = ttywrite,
+ .d_ioctl = promioctl,
+ .d_poll = ttypoll,
+ .d_name = "prom",
+ .d_maj = CDEV_MAJOR,
};
diff --git a/sys/alpha/tlsb/zs_tlsb.c b/sys/alpha/tlsb/zs_tlsb.c
index c22e4fc..bc82c3c 100644
--- a/sys/alpha/tlsb/zs_tlsb.c
+++ b/sys/alpha/tlsb/zs_tlsb.c
@@ -69,19 +69,14 @@ static d_ioctl_t zsioctl;
#define CDEV_MAJOR 135
static struct cdevsw zs_cdevsw = {
- /* open */ zsopen,
- /* close */ zsclose,
- /* read */ ttyread,
- /* write */ ttywrite,
- /* ioctl */ zsioctl,
- /* poll */ ttypoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "zs",
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = zsopen,
+ .d_close = zsclose,
+ .d_read = ttyread,
+ .d_write = ttywrite,
+ .d_ioctl = zsioctl,
+ .d_poll = ttypoll,
+ .d_name = "zs",
+ .d_maj = CDEV_MAJOR,
};
static void zsstart(struct tty *);
diff --git a/sys/amd64/acpica/acpi_machdep.c b/sys/amd64/acpica/acpi_machdep.c
index fbf649b..c0d8b91 100644
--- a/sys/amd64/acpica/acpi_machdep.c
+++ b/sys/amd64/acpica/acpi_machdep.c
@@ -64,19 +64,13 @@ static d_poll_t apmpoll;
#define CDEV_MAJOR 39
static struct cdevsw apm_cdevsw = {
- /* open */ apmopen,
- /* close */ apmclose,
- /* read */ noread,
- /* write */ apmwrite,
- /* ioctl */ apmioctl,
- /* poll */ apmpoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "apm",
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = apmopen,
+ .d_close = apmclose,
+ .d_write = apmwrite,
+ .d_ioctl = apmioctl,
+ .d_poll = apmpoll,
+ .d_name = "apm",
+ .d_maj = CDEV_MAJOR,
};
static int
diff --git a/sys/amd64/amd64/mem.c b/sys/amd64/amd64/mem.c
index a045d96..cae4f6a 100644
--- a/sys/amd64/amd64/mem.c
+++ b/sys/amd64/amd64/mem.c
@@ -78,19 +78,15 @@ static d_mmap_t memmmap;
#define CDEV_MAJOR 2
static struct cdevsw mem_cdevsw = {
- /* open */ mmopen,
- /* close */ mmclose,
- /* read */ mmrw,
- /* write */ mmrw,
- /* ioctl */ mmioctl,
- /* poll */ (d_poll_t *)seltrue,
- /* mmap */ memmmap,
- /* strategy */ nostrategy,
- /* name */ "mem",
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ D_MEM,
+ .d_open = mmopen,
+ .d_close = mmclose,
+ .d_read = mmrw,
+ .d_write = mmrw,
+ .d_ioctl = mmioctl,
+ .d_mmap = memmmap,
+ .d_name = "mem",
+ .d_maj = CDEV_MAJOR,
+ .d_flags = D_MEM,
};
MALLOC_DEFINE(M_MEMDESC, "memdesc", "memory range descriptors");
diff --git a/sys/cam/cam_xpt.c b/sys/cam/cam_xpt.c
index e22357b..0678380 100644
--- a/sys/cam/cam_xpt.c
+++ b/sys/cam/cam_xpt.c
@@ -636,19 +636,11 @@ static d_close_t xptclose;
static d_ioctl_t xptioctl;
static struct cdevsw xpt_cdevsw = {
- /* open */ xptopen,
- /* close */ xptclose,
- /* read */ noread,
- /* write */ nowrite,
- /* ioctl */ xptioctl,
- /* poll */ nopoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "xpt",
- /* maj */ XPT_CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = xptopen,
+ .d_close = xptclose,
+ .d_ioctl = xptioctl,
+ .d_name = "xpt",
+ .d_maj = XPT_CDEV_MAJOR,
};
static struct intr_config_hook *xpt_config_hook;
diff --git a/sys/cam/scsi/scsi_cd.c b/sys/cam/scsi/scsi_cd.c
index f785962..a76ec02 100644
--- a/sys/cam/scsi/scsi_cd.c
+++ b/sys/cam/scsi/scsi_cd.c
@@ -288,19 +288,15 @@ static struct periph_driver cddriver =
PERIPHDRIVER_DECLARE(cd, cddriver);
static struct cdevsw cd_cdevsw = {
- /* open */ cdopen,
- /* close */ cdclose,
- /* read */ physread,
- /* write */ physwrite,
- /* ioctl */ cdioctl,
- /* poll */ nopoll,
- /* mmap */ nommap,
- /* strategy */ cdstrategy,
- /* name */ "cd",
- /* maj */ CD_CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ D_DISK,
+ .d_open = cdopen,
+ .d_close = cdclose,
+ .d_read = physread,
+ .d_write = physwrite,
+ .d_ioctl = cdioctl,
+ .d_strategy = cdstrategy,
+ .d_name = "cd",
+ .d_maj = CD_CDEV_MAJOR,
+ .d_flags = D_DISK,
};
static int num_changers;
diff --git a/sys/cam/scsi/scsi_ch.c b/sys/cam/scsi/scsi_ch.c
index fcbb53b..d64b78c 100644
--- a/sys/cam/scsi/scsi_ch.c
+++ b/sys/cam/scsi/scsi_ch.c
@@ -211,19 +211,11 @@ static struct periph_driver chdriver =
PERIPHDRIVER_DECLARE(ch, chdriver);
static struct cdevsw ch_cdevsw = {
- /* open */ chopen,
- /* close */ chclose,
- /* read */ noread,
- /* write */ nowrite,
- /* ioctl */ chioctl,
- /* poll */ nopoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "ch",
- /* maj */ CH_CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = chopen,
+ .d_close = chclose,
+ .d_ioctl = chioctl,
+ .d_name = "ch",
+ .d_maj = CH_CDEV_MAJOR,
};
static void
diff --git a/sys/cam/scsi/scsi_pass.c b/sys/cam/scsi/scsi_pass.c
index 13580a0..bbe9939 100644
--- a/sys/cam/scsi/scsi_pass.c
+++ b/sys/cam/scsi/scsi_pass.c
@@ -105,19 +105,11 @@ static struct periph_driver passdriver =
PERIPHDRIVER_DECLARE(pass, passdriver);
static struct cdevsw pass_cdevsw = {
- /* open */ passopen,
- /* close */ passclose,
- /* read */ noread,
- /* write */ nowrite,
- /* ioctl */ passioctl,
- /* poll */ nopoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "pass",
- /* maj */ PASS_CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = passopen,
+ .d_close = passclose,
+ .d_ioctl = passioctl,
+ .d_name = "pass",
+ .d_maj = PASS_CDEV_MAJOR,
};
static void
diff --git a/sys/cam/scsi/scsi_pt.c b/sys/cam/scsi/scsi_pt.c
index a7c29e7..ec3409b 100644
--- a/sys/cam/scsi/scsi_pt.c
+++ b/sys/cam/scsi/scsi_pt.c
@@ -118,19 +118,14 @@ PERIPHDRIVER_DECLARE(pt, ptdriver);
#define PT_CDEV_MAJOR 61
static struct cdevsw pt_cdevsw = {
- /* open */ ptopen,
- /* close */ ptclose,
- /* read */ physread,
- /* write */ physwrite,
- /* ioctl */ ptioctl,
- /* poll */ nopoll,
- /* mmap */ nommap,
- /* strategy */ ptstrategy,
- /* name */ "pt",
- /* maj */ PT_CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = ptopen,
+ .d_close = ptclose,
+ .d_read = physread,
+ .d_write = physwrite,
+ .d_ioctl = ptioctl,
+ .d_strategy = ptstrategy,
+ .d_name = "pt",
+ .d_maj = PT_CDEV_MAJOR,
};
#ifndef SCSI_PT_DEFAULT_TIMEOUT
diff --git a/sys/cam/scsi/scsi_sa.c b/sys/cam/scsi/scsi_sa.c
index e77865b..6ab3b5a 100644
--- a/sys/cam/scsi/scsi_sa.c
+++ b/sys/cam/scsi/scsi_sa.c
@@ -426,19 +426,15 @@ PERIPHDRIVER_DECLARE(sa, sadriver);
#define SA_CDEV_MAJOR 14
static struct cdevsw sa_cdevsw = {
- /* open */ saopen,
- /* close */ saclose,
- /* read */ physread,
- /* write */ physwrite,
- /* ioctl */ saioctl,
- /* poll */ nopoll,
- /* mmap */ nommap,
- /* strategy */ sastrategy,
- /* name */ "sa",
- /* maj */ SA_CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ D_TAPE,
+ .d_open = saopen,
+ .d_close = saclose,
+ .d_read = physread,
+ .d_write = physwrite,
+ .d_ioctl = saioctl,
+ .d_strategy = sastrategy,
+ .d_name = "sa",
+ .d_maj = SA_CDEV_MAJOR,
+ .d_flags = D_TAPE,
};
static int
diff --git a/sys/cam/scsi/scsi_ses.c b/sys/cam/scsi/scsi_ses.c
index 096c08b..fcdb450 100644
--- a/sys/cam/scsi/scsi_ses.c
+++ b/sys/cam/scsi/scsi_ses.c
@@ -176,19 +176,11 @@ PERIPHDRIVER_DECLARE(ses, sesdriver);
static struct cdevsw ses_cdevsw =
{
- /* open */ sesopen,
- /* close */ sesclose,
- /* read */ noread,
- /* write */ nowrite,
- /* ioctl */ sesioctl,
- /* poll */ nopoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "ses",
- /* maj */ SES_CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = sesopen,
+ .d_close = sesclose,
+ .d_ioctl = sesioctl,
+ .d_name = "ses",
+ .d_maj = SES_CDEV_MAJOR,
};
static void
diff --git a/sys/cam/scsi/scsi_target.c b/sys/cam/scsi/scsi_target.c
index 4e95c06..de7e05c 100644
--- a/sys/cam/scsi/scsi_target.c
+++ b/sys/cam/scsi/scsi_target.c
@@ -105,20 +105,16 @@ static struct filterops targread_filtops =
#define TARG_CDEV_MAJOR 65
static struct cdevsw targ_cdevsw = {
- /* open */ targopen,
- /* close */ targclose,
- /* read */ targread,
- /* write */ targwrite,
- /* ioctl */ targioctl,
- /* poll */ targpoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "targ",
- /* maj */ TARG_CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ D_KQFILTER,
- /* kqfilter */ targkqfilter
+ .d_open = targopen,
+ .d_close = targclose,
+ .d_read = targread,
+ .d_write = targwrite,
+ .d_ioctl = targioctl,
+ .d_poll = targpoll,
+ .d_name = "targ",
+ .d_maj = TARG_CDEV_MAJOR,
+ .d_flags = D_KQFILTER,
+ .d_kqfilter = targkqfilter
};
static cam_status targendislun(struct cam_path *path, int enable,
diff --git a/sys/coda/coda_fbsd.c b/sys/coda/coda_fbsd.c
index 6907c63..23ce5e4 100644
--- a/sys/coda/coda_fbsd.c
+++ b/sys/coda/coda_fbsd.c
@@ -66,19 +66,14 @@
#define VC_DEV_NO 93
static struct cdevsw codadevsw = {
- /* open */ vc_nb_open,
- /* close */ vc_nb_close,
- /* read */ vc_nb_read,
- /* write */ vc_nb_write,
- /* ioctl */ vc_nb_ioctl,
- /* poll */ vc_nb_poll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "Coda",
- /* maj */ VC_DEV_NO,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = vc_nb_open,
+ .d_close = vc_nb_close,
+ .d_read = vc_nb_read,
+ .d_write = vc_nb_write,
+ .d_ioctl = vc_nb_ioctl,
+ .d_poll = vc_nb_poll,
+ .d_name = "Coda",
+ .d_maj = VC_DEV_NO,
};
int vcdebug = 1;
diff --git a/sys/contrib/ipfilter/netinet/mlfk_ipl.c b/sys/contrib/ipfilter/netinet/mlfk_ipl.c
index a9386c4..f150003 100644
--- a/sys/contrib/ipfilter/netinet/mlfk_ipl.c
+++ b/sys/contrib/ipfilter/netinet/mlfk_ipl.c
@@ -105,19 +105,12 @@ SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_minttllog, CTLFLAG_RW,
#define CDEV_MAJOR 79
static struct cdevsw ipl_cdevsw = {
- /* open */ iplopen,
- /* close */ iplclose,
- /* read */ iplread,
- /* write */ nowrite,
- /* ioctl */ iplioctl,
- /* poll */ nopoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "ipl",
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = iplopen,
+ .d_close = iplclose,
+ .d_read = iplread,
+ .d_ioctl = iplioctl,
+ .d_name = "ipl",
+ .d_maj = CDEV_MAJOR,
};
static int
diff --git a/sys/dev/aac/aac.c b/sys/dev/aac/aac.c
index 619ffd4..0eb036c 100644
--- a/sys/dev/aac/aac.c
+++ b/sys/dev/aac/aac.c
@@ -182,19 +182,12 @@ static int aac_query_disk(struct aac_softc *sc, caddr_t uptr);
#define AAC_CDEV_MAJOR 150
static struct cdevsw aac_cdevsw = {
- aac_open, /* open */
- aac_close, /* close */
- noread, /* read */
- nowrite, /* write */
- aac_ioctl, /* ioctl */
- aac_poll, /* poll */
- nommap, /* mmap */
- nostrategy, /* strategy */
- "aac", /* name */
- AAC_CDEV_MAJOR, /* major */
- nodump, /* dump */
- nopsize, /* psize */
- 0, /* flags */
+ .d_open = aac_open,
+ .d_close = aac_close,
+ .d_ioctl = aac_ioctl,
+ .d_poll = aac_poll,
+ .d_name = "aac",
+ .d_maj = AAC_CDEV_MAJOR,
};
MALLOC_DEFINE(M_AACBUF, "aacbuf", "Buffers for the AAC driver");
diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c
index 13b516c..ff4092a 100644
--- a/sys/dev/acpica/acpi.c
+++ b/sys/dev/acpica/acpi.c
@@ -74,19 +74,11 @@ static d_ioctl_t acpiioctl;
#define CDEV_MAJOR 152
static struct cdevsw acpi_cdevsw = {
- /* open */ acpiopen,
- /* close */ acpiclose,
- /* read */ noread,
- /* write */ nowrite,
- /* ioctl */ acpiioctl,
- /* poll */ nopoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "acpi",
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0
+ .d_open = acpiopen,
+ .d_close = acpiclose,
+ .d_ioctl = acpiioctl,
+ .d_name = "acpi",
+ .d_maj = CDEV_MAJOR,
};
static const char* sleep_state_names[] = {
diff --git a/sys/dev/agp/agp.c b/sys/dev/agp/agp.c
index be2f7f8..8c59946 100644
--- a/sys/dev/agp/agp.c
+++ b/sys/dev/agp/agp.c
@@ -70,19 +70,13 @@ static d_ioctl_t agp_ioctl;
static d_mmap_t agp_mmap;
static struct cdevsw agp_cdevsw = {
- /* open */ agp_open,
- /* close */ agp_close,
- /* read */ noread,
- /* write */ nowrite,
- /* ioctl */ agp_ioctl,
- /* poll */ nopoll,
- /* mmap */ agp_mmap,
- /* strategy */ nostrategy,
- /* name */ "agp",
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ D_TTY,
+ .d_open = agp_open,
+ .d_close = agp_close,
+ .d_ioctl = agp_ioctl,
+ .d_mmap = agp_mmap,
+ .d_name = "agp",
+ .d_maj = CDEV_MAJOR,
+ .d_flags = D_TTY,
};
static devclass_t agp_devclass;
diff --git a/sys/dev/amr/amr.c b/sys/dev/amr/amr.c
index bf81df3..3b58af5 100644
--- a/sys/dev/amr/amr.c
+++ b/sys/dev/amr/amr.c
@@ -94,19 +94,11 @@ static d_close_t amr_close;
static d_ioctl_t amr_ioctl;
static struct cdevsw amr_cdevsw = {
- /* open */ amr_open,
- /* close */ amr_close,
- /* read */ noread,
- /* write */ nowrite,
- /* ioctl */ amr_ioctl,
- /* poll */ nopoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "amr",
- /* maj */ AMR_CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = amr_open,
+ .d_close = amr_close,
+ .d_ioctl = amr_ioctl,
+ .d_name = "amr",
+ .d_maj = AMR_CDEV_MAJOR,
};
/*
diff --git a/sys/dev/asr/asr.c b/sys/dev/asr/asr.c
index 78cf0a2..bb1f5ff 100644
--- a/sys/dev/asr/asr.c
+++ b/sys/dev/asr/asr.c
@@ -577,19 +577,11 @@ DATA_SET (mode0_pciset, mode0_pcidev);
*/
#define CDEV_MAJOR 154 /* preferred default character major */
STATIC struct cdevsw asr_cdevsw = {
- asr_open, /* open */
- asr_close, /* close */
- noread, /* read */
- nowrite, /* write */
- asr_ioctl, /* ioctl */
- nopoll, /* poll */
- nommap, /* mmap */
- nostrategy, /* strategy */
- "asr", /* name */
- CDEV_MAJOR, /* maj */
- nodump, /* dump */
- nopsize, /* psize */
- 0, /* flags */
+ .d_open = asr_open,
+ .d_close = asr_close,
+ .d_ioctl = asr_ioctl,
+ .d_name = "asr",
+ .d_maj = CDEV_MAJOR,
};
#ifdef ASR_MEASURE_PERFORMANCE
diff --git a/sys/dev/ata/ata-all.c b/sys/dev/ata/ata-all.c
index 34cf1df..fae76a5 100644
--- a/sys/dev/ata/ata-all.c
+++ b/sys/dev/ata/ata-all.c
@@ -57,19 +57,11 @@
/* device structures */
static d_ioctl_t ataioctl;
static struct cdevsw ata_cdevsw = {
- /* open */ nullopen,
- /* close */ nullclose,
- /* read */ noread,
- /* write */ nowrite,
- /* ioctl */ ataioctl,
- /* poll */ nopoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "ata",
- /* maj */ 159,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = nullopen,
+ .d_close = nullclose,
+ .d_ioctl = ataioctl,
+ .d_name = "ata",
+ .d_maj = 159,
};
/* prototypes */
diff --git a/sys/dev/ata/atapi-cd.c b/sys/dev/ata/atapi-cd.c
index 60d2302..e7d98d6 100644
--- a/sys/dev/ata/atapi-cd.c
+++ b/sys/dev/ata/atapi-cd.c
@@ -55,19 +55,15 @@ static d_close_t acdclose;
static d_ioctl_t acdioctl;
static d_strategy_t acdstrategy;
static struct cdevsw acd_cdevsw = {
- /* open */ acdopen,
- /* close */ acdclose,
- /* read */ physread,
- /* write */ physwrite,
- /* ioctl */ acdioctl,
- /* poll */ nopoll,
- /* mmap */ nommap,
- /* strategy */ acdstrategy,
- /* name */ "acd",
- /* maj */ 117,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ D_DISK | D_TRACKCLOSE,
+ .d_open = acdopen,
+ .d_close = acdclose,
+ .d_read = physread,
+ .d_write = physwrite,
+ .d_ioctl = acdioctl,
+ .d_strategy = acdstrategy,
+ .d_name = "acd",
+ .d_maj = 117,
+ .d_flags = D_DISK | D_TRACKCLOSE,
};
/* prototypes */
diff --git a/sys/dev/ata/atapi-tape.c b/sys/dev/ata/atapi-tape.c
index 76a5c46..b81dd94 100644
--- a/sys/dev/ata/atapi-tape.c
+++ b/sys/dev/ata/atapi-tape.c
@@ -52,19 +52,15 @@ static d_close_t astclose;
static d_ioctl_t astioctl;
static d_strategy_t aststrategy;
static struct cdevsw ast_cdevsw = {
- /* open */ astopen,
- /* close */ astclose,
- /* read */ physread,
- /* write */ physwrite,
- /* ioctl */ astioctl,
- /* poll */ nopoll,
- /* mmap */ nommap,
- /* strategy */ aststrategy,
- /* name */ "ast",
- /* maj */ 119,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ D_TAPE | D_TRACKCLOSE,
+ .d_open = astopen,
+ .d_close = astclose,
+ .d_read = physread,
+ .d_write = physwrite,
+ .d_ioctl = astioctl,
+ .d_strategy = aststrategy,
+ .d_name = "ast",
+ .d_maj = 119,
+ .d_flags = D_TAPE | D_TRACKCLOSE,
};
/* prototypes */
diff --git a/sys/dev/atkbdc/psm.c b/sys/dev/atkbdc/psm.c
index 5b4cc20..968491d 100644
--- a/sys/dev/atkbdc/psm.c
+++ b/sys/dev/atkbdc/psm.c
@@ -326,19 +326,13 @@ static driver_t psm_driver = {
#define CDEV_MAJOR 21
static struct cdevsw psm_cdevsw = {
- /* open */ psmopen,
- /* close */ psmclose,
- /* read */ psmread,
- /* write */ nowrite,
- /* ioctl */ psmioctl,
- /* poll */ psmpoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ PSM_DRIVER_NAME,
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = psmopen,
+ .d_close = psmclose,
+ .d_read = psmread,
+ .d_ioctl = psmioctl,
+ .d_poll = psmpoll,
+ .d_name = PSM_DRIVER_NAME,
+ .d_maj = CDEV_MAJOR,
};
/* debug message level */
diff --git a/sys/dev/bktr/bktr_os.c b/sys/dev/bktr/bktr_os.c
index 7c7f9a1..c088510 100644
--- a/sys/dev/bktr/bktr_os.c
+++ b/sys/dev/bktr/bktr_os.c
@@ -247,19 +247,15 @@ static d_poll_t bktr_poll;
#define CDEV_MAJOR 92
static struct cdevsw bktr_cdevsw = {
- /* open */ bktr_open,
- /* close */ bktr_close,
- /* read */ bktr_read,
- /* write */ bktr_write,
- /* ioctl */ bktr_ioctl,
- /* poll */ bktr_poll,
- /* mmap */ bktr_mmap,
- /* strategy */ nostrategy,
- /* name */ "bktr",
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = bktr_open,
+ .d_close = bktr_close,
+ .d_read = bktr_read,
+ .d_write = bktr_write,
+ .d_ioctl = bktr_ioctl,
+ .d_poll = bktr_poll,
+ .d_mmap = bktr_mmap,
+ .d_name = "bktr",
+ .d_maj = CDEV_MAJOR,
};
DRIVER_MODULE(bktr, pci, bktr_driver, bktr_devclass, 0, 0);
diff --git a/sys/dev/ccd/ccd.c b/sys/dev/ccd/ccd.c
index 4fe4f98..ce4030b 100644
--- a/sys/dev/ccd/ccd.c
+++ b/sys/dev/ccd/ccd.c
@@ -115,19 +115,11 @@ static d_ioctl_t ccdctlioctl;
#define CDEV_MAJOR 74
static struct cdevsw ccdctl_cdevsw = {
- /* open */ nullopen,
- /* close */ nullclose,
- /* read */ noread,
- /* write */ nowrite,
- /* ioctl */ ccdctlioctl,
- /* poll */ nopoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "ccdctl",
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0
+ .d_open = nullopen,
+ .d_close = nullclose,
+ .d_ioctl = ccdctlioctl,
+ .d_name = "ccdctl",
+ .d_maj = CDEV_MAJOR,
};
static LIST_HEAD(, ccd_s) ccd_softc_list =
diff --git a/sys/dev/ciss/ciss.c b/sys/dev/ciss/ciss.c
index 7c23895..5b41162 100644
--- a/sys/dev/ciss/ciss.c
+++ b/sys/dev/ciss/ciss.c
@@ -217,20 +217,11 @@ static d_ioctl_t ciss_ioctl;
#define CISS_CDEV_MAJOR 166
static struct cdevsw ciss_cdevsw = {
- /* open */ ciss_open,
- /* close */ ciss_close,
- /* read */ noread,
- /* write */ nowrite,
- /* ioctl */ ciss_ioctl,
- /* poll */ nopoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "ciss",
- /* maj */ CISS_CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
- /* kqfilter */ nokqfilter
+ .d_open = ciss_open,
+ .d_close = ciss_close,
+ .d_ioctl = ciss_ioctl,
+ .d_name = "ciss",
+ .d_maj = CISS_CDEV_MAJOR,
};
/************************************************************************
diff --git a/sys/dev/cy/cy.c b/sys/dev/cy/cy.c
index 0d54043..53ea3bc 100644
--- a/sys/dev/cy/cy.c
+++ b/sys/dev/cy/cy.c
@@ -397,20 +397,16 @@ static d_ioctl_t sioioctl;
#define CDEV_MAJOR 48
static struct cdevsw sio_cdevsw = {
- /* open */ sioopen,
- /* close */ sioclose,
- /* read */ ttyread,
- /* write */ siowrite,
- /* ioctl */ sioioctl,
- /* poll */ ttypoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ driver_name,
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ D_TTY | D_KQFILTER,
- /* kqfilter */ ttykqfilter,
+ .d_open = sioopen,
+ .d_close = sioclose,
+ .d_read = ttyread,
+ .d_write = siowrite,
+ .d_ioctl = sioioctl,
+ .d_poll = ttypoll,
+ .d_name = driver_name,
+ .d_maj = CDEV_MAJOR,
+ .d_flags = D_TTY | D_KQFILTER,
+ .d_kqfilter = ttykqfilter,
};
static int comconsole = -1;
diff --git a/sys/dev/cy/cy_isa.c b/sys/dev/cy/cy_isa.c
index 0d54043..53ea3bc 100644
--- a/sys/dev/cy/cy_isa.c
+++ b/sys/dev/cy/cy_isa.c
@@ -397,20 +397,16 @@ static d_ioctl_t sioioctl;
#define CDEV_MAJOR 48
static struct cdevsw sio_cdevsw = {
- /* open */ sioopen,
- /* close */ sioclose,
- /* read */ ttyread,
- /* write */ siowrite,
- /* ioctl */ sioioctl,
- /* poll */ ttypoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ driver_name,
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ D_TTY | D_KQFILTER,
- /* kqfilter */ ttykqfilter,
+ .d_open = sioopen,
+ .d_close = sioclose,
+ .d_read = ttyread,
+ .d_write = siowrite,
+ .d_ioctl = sioioctl,
+ .d_poll = ttypoll,
+ .d_name = driver_name,
+ .d_maj = CDEV_MAJOR,
+ .d_flags = D_TTY | D_KQFILTER,
+ .d_kqfilter = ttykqfilter,
};
static int comconsole = -1;
diff --git a/sys/dev/dgb/dgb.c b/sys/dev/dgb/dgb.c
index 1f10380..b702297 100644
--- a/sys/dev/dgb/dgb.c
+++ b/sys/dev/dgb/dgb.c
@@ -242,20 +242,16 @@ static d_ioctl_t dgbioctl;
#define CDEV_MAJOR 58
static struct cdevsw dgb_cdevsw = {
- /* open */ dgbopen,
- /* close */ dgbclose,
- /* read */ ttyread,
- /* write */ ttywrite,
- /* ioctl */ dgbioctl,
- /* poll */ ttypoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "dgb",
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ D_TTY | D_KQFILTER,
- /* kqfilter */ ttykqfilter,
+ .d_open = dgbopen,
+ .d_close = dgbclose,
+ .d_read = ttyread,
+ .d_write = ttywrite,
+ .d_ioctl = dgbioctl,
+ .d_poll = ttypoll,
+ .d_name = "dgb",
+ .d_maj = CDEV_MAJOR,
+ .d_flags = D_TTY | D_KQFILTER,
+ .d_kqfilter = ttykqfilter,
};
static speed_t dgbdefaultrate = TTYDEF_SPEED;
diff --git a/sys/dev/digi/digi.c b/sys/dev/digi/digi.c
index ab86ad5..42c1b1c 100644
--- a/sys/dev/digi/digi.c
+++ b/sys/dev/digi/digi.c
@@ -143,20 +143,16 @@ const struct digi_control_signals digi_normal_signals = {
};
static struct cdevsw digi_sw = {
- /* open */ digiopen,
- /* close */ digiclose,
- /* read */ digiread,
- /* write */ digiwrite,
- /* ioctl */ digiioctl,
- /* poll */ ttypoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ driver_name,
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ D_TTY | D_KQFILTER,
- /* kqfilter */ ttykqfilter
+ .d_open = digiopen,
+ .d_close = digiclose,
+ .d_read = digiread,
+ .d_write = digiwrite,
+ .d_ioctl = digiioctl,
+ .d_poll = ttypoll,
+ .d_name = driver_name,
+ .d_maj = CDEV_MAJOR,
+ .d_flags = D_TTY | D_KQFILTER,
+ .d_kqfilter = ttykqfilter
};
static void
diff --git a/sys/dev/drm/drm_drv.h b/sys/dev/drm/drm_drv.h
index 729b2f9..f24422e 100644
--- a/sys/dev/drm/drm_drv.h
+++ b/sys/dev/drm/drm_drv.h
@@ -316,21 +316,18 @@ static driver_t DRM(driver) = {
static devclass_t DRM( devclass);
static struct cdevsw DRM( cdevsw) = {
- /* open */ DRM( open ),
- /* close */ DRM( close ),
- /* read */ DRM( read ),
- /* write */ DRM( write ),
- /* ioctl */ DRM( ioctl ),
- /* poll */ DRM( poll ),
- /* mmap */ DRM( mmap ),
- /* strategy */ nostrategy,
- /* name */ DRIVER_NAME,
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ D_TTY | D_TRACKCLOSE,
+ .d_open = DRM( open ),
+ .d_close = DRM( close ),
+ .d_read = DRM( read ),
+ .d_write = DRM( write ),
+ .d_ioctl = DRM( ioctl ),
+ .d_poll = DRM( poll ),
+ .d_mmap = DRM( mmap ),
+ .d_name = DRIVER_NAME,
+ .d_maj = CDEV_MAJOR,
+ .d_flags = D_TTY | D_TRACKCLOSE,
#if __FreeBSD_version >= 500000
- /* kqfilter */ 0
+ .d_kqfilter = 0
#else
/* bmaj */ -1
#endif
diff --git a/sys/dev/fb/fb.c b/sys/dev/fb/fb.c
index 839e9a4..073ffd8 100644
--- a/sys/dev/fb/fb.c
+++ b/sys/dev/fb/fb.c
@@ -363,19 +363,14 @@ static d_mmap_t fbmmap;
#define CDEV_MAJOR 123 /* XXX */
static struct cdevsw fb_cdevsw = {
- /* open */ fbopen,
- /* close */ fbclose,
- /* read */ fbread,
- /* write */ fbwrite,
- /* ioctl */ fbioctl,
- /* poll */ nopoll,
- /* mmap */ fbmmap,
- /* strategy */ nostrategy,
- /* name */ FB_DRIVER_NAME,
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = fbopen,
+ .d_close = fbclose,
+ .d_read = fbread,
+ .d_write = fbwrite,
+ .d_ioctl = fbioctl,
+ .d_mmap = fbmmap,
+ .d_name = FB_DRIVER_NAME,
+ .d_maj = CDEV_MAJOR,
};
#endif
diff --git a/sys/dev/fdc/fdc.c b/sys/dev/fdc/fdc.c
index 9173564..bb2cc86 100644
--- a/sys/dev/fdc/fdc.c
+++ b/sys/dev/fdc/fdc.c
@@ -477,19 +477,15 @@ fdin_rd(fdc_p fdc)
#define CDEV_MAJOR 9
static struct cdevsw fd_cdevsw = {
- /* open */ Fdopen,
- /* close */ fdclose,
- /* read */ physread,
- /* write */ physwrite,
- /* ioctl */ fdioctl,
- /* poll */ nopoll,
- /* mmap */ nommap,
- /* strategy */ fdstrategy,
- /* name */ "fd",
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ D_DISK,
+ .d_open = Fdopen,
+ .d_close = fdclose,
+ .d_read = physread,
+ .d_write = physwrite,
+ .d_ioctl = fdioctl,
+ .d_strategy = fdstrategy,
+ .d_name = "fd",
+ .d_maj = CDEV_MAJOR,
+ .d_flags = D_DISK,
};
/*
diff --git a/sys/dev/firewire/fwdev.c b/sys/dev/firewire/fwdev.c
index 35f221c..fe79bc7 100644
--- a/sys/dev/firewire/fwdev.c
+++ b/sys/dev/firewire/fwdev.c
@@ -67,19 +67,16 @@ static d_mmap_t fw_mmap;
struct cdevsw firewire_cdevsw =
{
- /* open */ fw_open,
- /* close */ fw_close,
- /* read */ fw_read,
- /* write */ fw_write,
- /* ioctl */ fw_ioctl,
- /* poll */ fw_poll,
- /* mmap */ fw_mmap,
- /* strategy */ nostrategy,
- /* name */ "fw",
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ D_MEM
+ .d_open = fw_open,
+ .d_close = fw_close,
+ .d_read = fw_read,
+ .d_write = fw_write,
+ .d_ioctl = fw_ioctl,
+ .d_poll = fw_poll,
+ .d_mmap = fw_mmap,
+ .d_name = "fw",
+ .d_maj = CDEV_MAJOR,
+ .d_flags = D_MEM
};
static int
diff --git a/sys/dev/hfa/fore_load.c b/sys/dev/hfa/fore_load.c
index ab4de54..334cb88 100644
--- a/sys/dev/hfa/fore_load.c
+++ b/sys/dev/hfa/fore_load.c
@@ -507,19 +507,7 @@ fore_reset(fup)
* Driver entry points
*/
static struct cdevsw fore_cdev = {
- /* open */ noopen,
- /* close */ noclose,
- /* read */ noread,
- /* write */ nowrite,
- /* ioctl */ noioctl,
- /* poll */ nopoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ noname,
- /* maj */ -1,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_maj = -1,
};
diff --git a/sys/dev/iicbus/iic.c b/sys/dev/iicbus/iic.c
index 59317e2..cd33d2c 100644
--- a/sys/dev/iicbus/iic.c
+++ b/sys/dev/iicbus/iic.c
@@ -94,19 +94,13 @@ static d_ioctl_t iicioctl;
#define CDEV_MAJOR 105
static struct cdevsw iic_cdevsw = {
- /* open */ iicopen,
- /* close */ iicclose,
- /* read */ iicread,
- /* write */ iicwrite,
- /* ioctl */ iicioctl,
- /* poll */ nopoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "iic",
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = iicopen,
+ .d_close = iicclose,
+ .d_read = iicread,
+ .d_write = iicwrite,
+ .d_ioctl = iicioctl,
+ .d_name = "iic",
+ .d_maj = CDEV_MAJOR,
};
static void
diff --git a/sys/dev/iir/iir_ctrl.c b/sys/dev/iir/iir_ctrl.c
index 29f4ea6..80670e0 100644
--- a/sys/dev/iir/iir_ctrl.c
+++ b/sys/dev/iir/iir_ctrl.c
@@ -69,20 +69,13 @@ 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 = {
- /* open */ iir_open,
- /* close */ iir_close,
- /* read */ iir_read,
- /* write */ iir_write,
- /* ioctl */ iir_ioctl,
- /* poll */ nopoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "iir",
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
- /* kqfilter */ nokqfilter
+ .d_open = iir_open,
+ .d_close = iir_close,
+ .d_read = iir_read,
+ .d_write = iir_write,
+ .d_ioctl = iir_ioctl,
+ .d_name = "iir",
+ .d_maj = CDEV_MAJOR,
};
#ifndef SDEV_PER_HBA
diff --git a/sys/dev/isp/isp_freebsd.c b/sys/dev/isp/isp_freebsd.c
index 5e1011d..d425166 100644
--- a/sys/dev/isp/isp_freebsd.c
+++ b/sys/dev/isp/isp_freebsd.c
@@ -50,19 +50,12 @@ static void isp_action(struct cam_sim *, union ccb *);
#define ISP_CDEV_MAJOR 248
static struct cdevsw isp_cdevsw = {
- /* open */ nullopen,
- /* close */ nullclose,
- /* read */ noread,
- /* write */ nowrite,
- /* ioctl */ ispioctl,
- /* poll */ nopoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "isp",
- /* maj */ ISP_CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ D_TAPE,
+ .d_open = nullopen,
+ .d_close = nullclose,
+ .d_ioctl = ispioctl,
+ .d_name = "isp",
+ .d_maj = ISP_CDEV_MAJOR,
+ .d_flags = D_TAPE,
};
static struct ispsoftc *isplist = NULL;
diff --git a/sys/dev/joy/joy.c b/sys/dev/joy/joy.c
index c00b811..cc61edf 100644
--- a/sys/dev/joy/joy.c
+++ b/sys/dev/joy/joy.c
@@ -68,19 +68,12 @@ static d_read_t joyread;
static d_ioctl_t joyioctl;
static struct cdevsw joy_cdevsw = {
- /* open */ joyopen,
- /* close */ joyclose,
- /* read */ joyread,
- /* write */ nowrite,
- /* ioctl */ joyioctl,
- /* poll */ nopoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "joy",
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = joyopen,
+ .d_close = joyclose,
+ .d_read = joyread,
+ .d_ioctl = joyioctl,
+ .d_name = "joy",
+ .d_maj = CDEV_MAJOR,
};
devclass_t joy_devclass;
diff --git a/sys/dev/kbd/kbd.c b/sys/dev/kbd/kbd.c
index aa4c3f7..6a1fcaf 100644
--- a/sys/dev/kbd/kbd.c
+++ b/sys/dev/kbd/kbd.c
@@ -425,19 +425,14 @@ static d_poll_t genkbdpoll;
#define CDEV_MAJOR 112
static struct cdevsw kbd_cdevsw = {
- /* open */ genkbdopen,
- /* close */ genkbdclose,
- /* read */ genkbdread,
- /* write */ genkbdwrite,
- /* ioctl */ genkbdioctl,
- /* poll */ genkbdpoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "kbd",
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = genkbdopen,
+ .d_close = genkbdclose,
+ .d_read = genkbdread,
+ .d_write = genkbdwrite,
+ .d_ioctl = genkbdioctl,
+ .d_poll = genkbdpoll,
+ .d_name = "kbd",
+ .d_maj = CDEV_MAJOR,
};
int
diff --git a/sys/dev/mcd/mcd.c b/sys/dev/mcd/mcd.c
index 73197bd..cdd6e93 100644
--- a/sys/dev/mcd/mcd.c
+++ b/sys/dev/mcd/mcd.c
@@ -161,19 +161,14 @@ static d_strategy_t mcdstrategy;
#define CDEV_MAJOR 29
static struct cdevsw mcd_cdevsw = {
- /* open */ mcdopen,
- /* close */ mcdclose,
- /* read */ physread,
- /* write */ nowrite,
- /* ioctl */ mcdioctl,
- /* poll */ nopoll,
- /* mmap */ nommap,
- /* strategy */ mcdstrategy,
- /* name */ "mcd",
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ D_DISK,
+ .d_open = mcdopen,
+ .d_close = mcdclose,
+ .d_read = physread,
+ .d_ioctl = mcdioctl,
+ .d_strategy = mcdstrategy,
+ .d_name = "mcd",
+ .d_maj = CDEV_MAJOR,
+ .d_flags = D_DISK,
};
#define MCD_RETRYS 5
diff --git a/sys/dev/md/md.c b/sys/dev/md/md.c
index 591cd64..c03d10e 100644
--- a/sys/dev/md/md.c
+++ b/sys/dev/md/md.c
@@ -119,16 +119,11 @@ static dev_t status_dev = 0;
static d_ioctl_t mdctlioctl;
static struct cdevsw mdctl_cdevsw = {
- /* open */ nullopen,
- /* close */ nullclose,
- /* read */ noread,
- /* write */ nowrite,
- /* ioctl */ mdctlioctl,
- /* poll */ nopoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ MD_NAME,
- /* maj */ CDEV_MAJOR
+ .d_open = nullopen,
+ .d_close = nullclose,
+ .d_ioctl = mdctlioctl,
+ .d_name = MD_NAME,
+ .d_maj = CDEV_MAJOR
};
diff --git a/sys/dev/mlx/mlx.c b/sys/dev/mlx/mlx.c
index aecd9dc..df8c03d 100644
--- a/sys/dev/mlx/mlx.c
+++ b/sys/dev/mlx/mlx.c
@@ -56,19 +56,11 @@
#define MLX_CDEV_MAJOR 130
static struct cdevsw mlx_cdevsw = {
- /* open */ mlx_open,
- /* close */ mlx_close,
- /* read */ noread,
- /* write */ nowrite,
- /* ioctl */ mlx_ioctl,
- /* poll */ nopoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "mlx",
- /* maj */ MLX_CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = mlx_open,
+ .d_close = mlx_close,
+ .d_ioctl = mlx_ioctl,
+ .d_name = "mlx",
+ .d_maj = MLX_CDEV_MAJOR,
};
devclass_t mlx_devclass;
diff --git a/sys/dev/mly/mly.c b/sys/dev/mly/mly.c
index b48af80..9a0edc4 100644
--- a/sys/dev/mly/mly.c
+++ b/sys/dev/mly/mly.c
@@ -153,19 +153,11 @@ DRIVER_MODULE(mly, pci, mly_pci_driver, mly_devclass, 0, 0);
#define MLY_CDEV_MAJOR 158
static struct cdevsw mly_cdevsw = {
- /* open */ mly_user_open,
- /* close */ mly_user_close,
- /* read */ noread,
- /* write */ nowrite,
- /* ioctl */ mly_user_ioctl,
- /* poll */ nopoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "mly",
- /* maj */ MLY_CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0
+ .d_open = mly_user_open,
+ .d_close = mly_user_close,
+ .d_ioctl = mly_user_ioctl,
+ .d_name = "mly",
+ .d_maj = MLY_CDEV_MAJOR,
};
/********************************************************************************
diff --git a/sys/dev/mse/mse.c b/sys/dev/mse/mse.c
index 17622bd..57b0e7b 100644
--- a/sys/dev/mse/mse.c
+++ b/sys/dev/mse/mse.c
@@ -139,19 +139,13 @@ static d_poll_t msepoll;
#define CDEV_MAJOR 27
static struct cdevsw mse_cdevsw = {
- /* open */ mseopen,
- /* close */ mseclose,
- /* read */ mseread,
- /* write */ nowrite,
- /* ioctl */ mseioctl,
- /* poll */ msepoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "mse",
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = mseopen,
+ .d_close = mseclose,
+ .d_read = mseread,
+ .d_ioctl = mseioctl,
+ .d_poll = msepoll,
+ .d_name = "mse",
+ .d_maj = CDEV_MAJOR,
};
static void mseintr(void *);
diff --git a/sys/dev/nmdm/nmdm.c b/sys/dev/nmdm/nmdm.c
index 6037451..8f5af46 100644
--- a/sys/dev/nmdm/nmdm.c
+++ b/sys/dev/nmdm/nmdm.c
@@ -70,19 +70,15 @@ static d_ioctl_t nmdmioctl;
#define CDEV_MAJOR 18
static struct cdevsw nmdm_cdevsw = {
- /* open */ nmdmopen,
- /* close */ nmdmclose,
- /* read */ nmdmread,
- /* write */ nmdmwrite,
- /* ioctl */ nmdmioctl,
- /* poll */ ttypoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "pts",
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ D_TTY,
+ .d_open = nmdmopen,
+ .d_close = nmdmclose,
+ .d_read = nmdmread,
+ .d_write = nmdmwrite,
+ .d_ioctl = nmdmioctl,
+ .d_poll = ttypoll,
+ .d_name = "pts",
+ .d_maj = CDEV_MAJOR,
+ .d_flags = D_TTY,
};
#define BUFSIZ 100 /* Chunk size iomoved to/from user */
diff --git a/sys/dev/null/null.c b/sys/dev/null/null.c
index c96faf0..75f9a90 100644
--- a/sys/dev/null/null.c
+++ b/sys/dev/null/null.c
@@ -51,37 +51,23 @@ static d_read_t null_read;
#define ZERO_MINOR 12
static struct cdevsw null_cdevsw = {
- /* open */ nullopen,
- /* close */ nullclose,
- /* read */ null_read,
- /* write */ null_write,
- /* ioctl */ null_ioctl,
- /* poll */ nopoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "null",
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
- /* kqfilter */ NULL
+ .d_open = nullopen,
+ .d_close = nullclose,
+ .d_read = null_read,
+ .d_write = null_write,
+ .d_ioctl = null_ioctl,
+ .d_name = "null",
+ .d_maj = CDEV_MAJOR,
};
static struct cdevsw zero_cdevsw = {
- /* open */ nullopen,
- /* close */ nullclose,
- /* read */ zero_read,
- /* write */ null_write,
- /* ioctl */ noioctl,
- /* poll */ nopoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "zero",
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ D_MMAP_ANON,
- /* kqfilter */ NULL
+ .d_open = nullopen,
+ .d_close = nullclose,
+ .d_read = zero_read,
+ .d_write = null_write,
+ .d_name = "zero",
+ .d_maj = CDEV_MAJOR,
+ .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 379a753..436dbc8 100644
--- a/sys/dev/ofw/ofw_console.c
+++ b/sys/dev/ofw/ofw_console.c
@@ -53,19 +53,14 @@ static d_ioctl_t ofw_dev_ioctl;
#define CDEV_MAJOR 97
static struct cdevsw ofw_cdevsw = {
- /* open */ ofw_dev_open,
- /* close */ ofw_dev_close,
- /* read */ ttyread,
- /* write */ ttywrite,
- /* ioctl */ ofw_dev_ioctl,
- /* poll */ ttypoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "ofw",
- /* major */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = ofw_dev_open,
+ .d_close = ofw_dev_close,
+ .d_read = ttyread,
+ .d_write = ttywrite,
+ .d_ioctl = ofw_dev_ioctl,
+ .d_poll = ttypoll,
+ .d_name = "ofw",
+ .d_maj = CDEV_MAJOR,
};
static struct tty *ofw_tp = NULL;
diff --git a/sys/dev/ofw/openfirmio.c b/sys/dev/ofw/openfirmio.c
index 6f40619..c197eb8 100644
--- a/sys/dev/ofw/openfirmio.c
+++ b/sys/dev/ofw/openfirmio.c
@@ -66,20 +66,11 @@ static d_ioctl_t openfirm_ioctl;
#define OPENFIRM_MINOR 0
static struct cdevsw openfirm_cdevsw = {
- /* open */ nullopen,
- /* close */ nullclose,
- /* read */ noread,
- /* write */ nowrite,
- /* ioctl */ openfirm_ioctl,
- /* poll */ nopoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "openfirm",
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
- /* kqfilter */ nokqfilter
+ .d_open = nullopen,
+ .d_close = nullclose,
+ .d_ioctl = openfirm_ioctl,
+ .d_name = "openfirm",
+ .d_maj = CDEV_MAJOR,
};
static phandle_t lastnode; /* speed hack */
diff --git a/sys/dev/pci/pci_user.c b/sys/dev/pci/pci_user.c
index 0c6fe51..f39a890 100644
--- a/sys/dev/pci/pci_user.c
+++ b/sys/dev/pci/pci_user.c
@@ -74,19 +74,11 @@ static d_ioctl_t pci_ioctl;
#endif
struct cdevsw pcicdev = {
- /* open */ pci_open,
- /* close */ pci_close,
- /* read */ noread,
- /* write */ nowrite,
- /* ioctl */ pci_ioctl,
- /* poll */ nopoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "pci",
- /* maj */ PCI_CDEV,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = pci_open,
+ .d_close = pci_close,
+ .d_ioctl = pci_ioctl,
+ .d_name = "pci",
+ .d_maj = PCI_CDEV,
};
static int
diff --git a/sys/dev/ppbus/lpt.c b/sys/dev/ppbus/lpt.c
index 43fda7e..54ba80e 100644
--- a/sys/dev/ppbus/lpt.c
+++ b/sys/dev/ppbus/lpt.c
@@ -189,19 +189,13 @@ static d_ioctl_t lptioctl;
#define CDEV_MAJOR 16
static struct cdevsw lpt_cdevsw = {
- /* open */ lptopen,
- /* close */ lptclose,
- /* read */ lptread,
- /* write */ lptwrite,
- /* ioctl */ lptioctl,
- /* poll */ nopoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ LPT_NAME,
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = lptopen,
+ .d_close = lptclose,
+ .d_read = lptread,
+ .d_write = lptwrite,
+ .d_ioctl = lptioctl,
+ .d_name = LPT_NAME,
+ .d_maj = CDEV_MAJOR,
};
static int
diff --git a/sys/dev/ppbus/pcfclock.c b/sys/dev/ppbus/pcfclock.c
index 014bd4d..940c02d 100644
--- a/sys/dev/ppbus/pcfclock.c
+++ b/sys/dev/ppbus/pcfclock.c
@@ -67,19 +67,11 @@ static d_read_t pcfclock_read;
#define CDEV_MAJOR 140
static struct cdevsw pcfclock_cdevsw = {
- /* open */ pcfclock_open,
- /* close */ pcfclock_close,
- /* read */ pcfclock_read,
- /* write */ nowrite,
- /* ioctl */ noioctl,
- /* poll */ nopoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ PCFCLOCK_NAME,
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = pcfclock_open,
+ .d_close = pcfclock_close,
+ .d_read = pcfclock_read,
+ .d_name = PCFCLOCK_NAME,
+ .d_maj = CDEV_MAJOR,
};
#ifndef PCFCLOCK_MAX_RETRIES
diff --git a/sys/dev/ppbus/ppi.c b/sys/dev/ppbus/ppi.c
index e1bc241..26bc5ce 100644
--- a/sys/dev/ppbus/ppi.c
+++ b/sys/dev/ppbus/ppi.c
@@ -90,19 +90,13 @@ static d_read_t ppiread;
#define CDEV_MAJOR 82
static struct cdevsw ppi_cdevsw = {
- /* open */ ppiopen,
- /* close */ ppiclose,
- /* read */ ppiread,
- /* write */ ppiwrite,
- /* ioctl */ ppiioctl,
- /* poll */ nopoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "ppi",
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = ppiopen,
+ .d_close = ppiclose,
+ .d_read = ppiread,
+ .d_write = ppiwrite,
+ .d_ioctl = ppiioctl,
+ .d_name = "ppi",
+ .d_maj = CDEV_MAJOR,
};
#ifdef PERIPH_1284
diff --git a/sys/dev/ppbus/pps.c b/sys/dev/ppbus/pps.c
index a142e3b..b1192a5 100644
--- a/sys/dev/ppbus/pps.c
+++ b/sys/dev/ppbus/pps.c
@@ -62,19 +62,11 @@ static d_ioctl_t ppsioctl;
#define CDEV_MAJOR 89
static struct cdevsw pps_cdevsw = {
- /* open */ ppsopen,
- /* close */ ppsclose,
- /* read */ noread,
- /* write */ nowrite,
- /* ioctl */ ppsioctl,
- /* poll */ nopoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ PPS_NAME,
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = ppsopen,
+ .d_close = ppsclose,
+ .d_ioctl = ppsioctl,
+ .d_name = PPS_NAME,
+ .d_maj = CDEV_MAJOR,
};
static void
diff --git a/sys/dev/raidframe/rf_freebsdkintf.c b/sys/dev/raidframe/rf_freebsdkintf.c
index 754ab51..6e1f407 100644
--- a/sys/dev/raidframe/rf_freebsdkintf.c
+++ b/sys/dev/raidframe/rf_freebsdkintf.c
@@ -215,19 +215,11 @@ d_close_t raidctlclose;
d_ioctl_t raidctlioctl;
static struct cdevsw raidctl_cdevsw = {
- /* open */ raidctlopen,
- /* close */ raidctlclose,
- /* read */ noread,
- /* write */ nowrite,
- /* ioctl */ raidctlioctl,
- /* poll */ nopoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "raidctl",
- /* maj */ 201,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = raidctlopen,
+ .d_close = raidctlclose,
+ .d_ioctl = raidctlioctl,
+ .d_name = "raidctl",
+ .d_maj = 201,
};
/*
diff --git a/sys/dev/random/randomdev.c b/sys/dev/random/randomdev.c
index d965cbc..5350d01 100644
--- a/sys/dev/random/randomdev.c
+++ b/sys/dev/random/randomdev.c
@@ -62,20 +62,14 @@ static d_poll_t random_poll;
#define RANDOM_MINOR 3
static struct cdevsw random_cdevsw = {
- /* open */ random_open,
- /* close */ random_close,
- /* read */ random_read,
- /* write */ random_write,
- /* ioctl */ random_ioctl,
- /* poll */ random_poll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "random",
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
- /* kqfilter */ NULL
+ .d_open = random_open,
+ .d_close = random_close,
+ .d_read = random_read,
+ .d_write = random_write,
+ .d_ioctl = random_ioctl,
+ .d_poll = random_poll,
+ .d_name = "random",
+ .d_maj = CDEV_MAJOR,
};
static void random_kthread(void *);
diff --git a/sys/dev/rc/rc.c b/sys/dev/rc/rc.c
index 1e4df70..eb023d8 100644
--- a/sys/dev/rc/rc.c
+++ b/sys/dev/rc/rc.c
@@ -146,20 +146,16 @@ static d_ioctl_t rcioctl;
#define CDEV_MAJOR 63
static struct cdevsw rc_cdevsw = {
- /* open */ rcopen,
- /* close */ rcclose,
- /* read */ ttyread,
- /* write */ ttywrite,
- /* ioctl */ rcioctl,
- /* poll */ ttypoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "rc",
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ D_TTY | D_KQFILTER,
- /* kqfilter */ ttykqfilter,
+ .d_open = rcopen,
+ .d_close = rcclose,
+ .d_read = ttyread,
+ .d_write = ttywrite,
+ .d_ioctl = rcioctl,
+ .d_poll = ttypoll,
+ .d_name = "rc",
+ .d_maj = CDEV_MAJOR,
+ .d_flags = D_TTY | D_KQFILTER,
+ .d_kqfilter = ttykqfilter,
};
static devclass_t rc_devclass;
diff --git a/sys/dev/rp/rp.c b/sys/dev/rp/rp.c
index 9c6dbe6..6927314 100644
--- a/sys/dev/rp/rp.c
+++ b/sys/dev/rp/rp.c
@@ -571,19 +571,15 @@ static d_ioctl_t rpioctl;
#define CDEV_MAJOR 81
struct cdevsw rp_cdevsw = {
- /* open */ rpopen,
- /* close */ rpclose,
- /* read */ ttyread,
- /* write */ rpwrite,
- /* ioctl */ rpioctl,
- /* poll */ ttypoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "rp",
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ D_TTY,
+ .d_open = rpopen,
+ .d_close = rpclose,
+ .d_read = ttyread,
+ .d_write = rpwrite,
+ .d_ioctl = rpioctl,
+ .d_poll = ttypoll,
+ .d_name = "rp",
+ .d_maj = CDEV_MAJOR,
+ .d_flags = D_TTY,
};
static int rp_num_ports_open = 0;
diff --git a/sys/dev/sab/sab.c b/sys/dev/sab/sab.c
index f77054f..56fd6ea 100644
--- a/sys/dev/sab/sab.c
+++ b/sys/dev/sab/sab.c
@@ -160,20 +160,16 @@ static void sabttystop(struct tty *tp, int rw);
static int sabttyparam(struct tty *tp, struct termios *t);
static struct cdevsw sabtty_cdevsw = {
- /* open */ sabttyopen,
- /* close */ sabttyclose,
- /* read */ ttyread,
- /* write */ ttywrite,
- /* ioctl */ sabttyioctl,
- /* poll */ ttypoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "sabtty",
- /* major */ MAJOR_AUTO,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ D_TTY | D_KQFILTER,
- /* kqfilter */ ttykqfilter,
+ .d_open = sabttyopen,
+ .d_close = sabttyclose,
+ .d_read = ttyread,
+ .d_write = ttywrite,
+ .d_ioctl = sabttyioctl,
+ .d_poll = ttypoll,
+ .d_name = "sabtty",
+ .d_maj = MAJOR_AUTO,
+ .d_flags = D_TTY | D_KQFILTER,
+ .d_kqfilter = ttykqfilter,
};
static device_method_t sab_methods[] = {
diff --git a/sys/dev/scd/scd.c b/sys/dev/scd/scd.c
index dfa13bb..88e4d07 100644
--- a/sys/dev/scd/scd.c
+++ b/sys/dev/scd/scd.c
@@ -146,19 +146,14 @@ static d_strategy_t scdstrategy;
#define CDEV_MAJOR 45
static struct cdevsw scd_cdevsw = {
- /* open */ scdopen,
- /* close */ scdclose,
- /* read */ physread,
- /* write */ nowrite,
- /* ioctl */ scdioctl,
- /* poll */ nopoll,
- /* mmap */ nommap,
- /* strategy */ scdstrategy,
- /* name */ "scd",
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ D_DISK,
+ .d_open = scdopen,
+ .d_close = scdclose,
+ .d_read = physread,
+ .d_ioctl = scdioctl,
+ .d_strategy = scdstrategy,
+ .d_name = "scd",
+ .d_maj = CDEV_MAJOR,
+ .d_flags = D_DISK,
};
int
diff --git a/sys/dev/si/si.c b/sys/dev/si/si.c
index b96d84f..ef37bfd 100644
--- a/sys/dev/si/si.c
+++ b/sys/dev/si/si.c
@@ -116,20 +116,16 @@ static d_ioctl_t siioctl;
#define CDEV_MAJOR 68
static struct cdevsw si_cdevsw = {
- /* open */ siopen,
- /* close */ siclose,
- /* read */ ttyread,
- /* write */ siwrite,
- /* ioctl */ siioctl,
- /* poll */ ttypoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "si",
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ D_TTY | D_KQFILTER,
- /* kqfilter */ ttykqfilter,
+ .d_open = siopen,
+ .d_close = siclose,
+ .d_read = ttyread,
+ .d_write = siwrite,
+ .d_ioctl = siioctl,
+ .d_poll = ttypoll,
+ .d_name = "si",
+ .d_maj = CDEV_MAJOR,
+ .d_flags = D_TTY | D_KQFILTER,
+ .d_kqfilter = ttykqfilter,
};
static int si_Nports;
diff --git a/sys/dev/sio/sio.c b/sys/dev/sio/sio.c
index 32b3cd1..9f28b32 100644
--- a/sys/dev/sio/sio.c
+++ b/sys/dev/sio/sio.c
@@ -314,20 +314,16 @@ static d_ioctl_t sioioctl;
#define CDEV_MAJOR 28
static struct cdevsw sio_cdevsw = {
- /* open */ sioopen,
- /* close */ sioclose,
- /* read */ sioread,
- /* write */ siowrite,
- /* ioctl */ sioioctl,
- /* poll */ ttypoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ sio_driver_name,
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ D_TTY | D_KQFILTER,
- /* kqfilter */ ttykqfilter,
+ .d_open = sioopen,
+ .d_close = sioclose,
+ .d_read = sioread,
+ .d_write = siowrite,
+ .d_ioctl = sioioctl,
+ .d_poll = ttypoll,
+ .d_name = sio_driver_name,
+ .d_maj = CDEV_MAJOR,
+ .d_flags = D_TTY | D_KQFILTER,
+ .d_kqfilter = ttykqfilter,
};
int comconsole = -1;
diff --git a/sys/dev/smbus/smb.c b/sys/dev/smbus/smb.c
index 392594f..1272c13 100644
--- a/sys/dev/smbus/smb.c
+++ b/sys/dev/smbus/smb.c
@@ -89,19 +89,13 @@ static d_ioctl_t smbioctl;
#define CDEV_MAJOR 106
static struct cdevsw smb_cdevsw = {
- /* open */ smbopen,
- /* close */ smbclose,
- /* read */ smbread,
- /* write */ smbwrite,
- /* ioctl */ smbioctl,
- /* poll */ nopoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "smb",
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = smbopen,
+ .d_close = smbclose,
+ .d_read = smbread,
+ .d_write = smbwrite,
+ .d_ioctl = smbioctl,
+ .d_name = "smb",
+ .d_maj = CDEV_MAJOR,
};
static void
diff --git a/sys/dev/snp/snp.c b/sys/dev/snp/snp.c
index 797b8d8..9b67b60 100644
--- a/sys/dev/snp/snp.c
+++ b/sys/dev/snp/snp.c
@@ -38,19 +38,14 @@ static d_poll_t snppoll;
#define CDEV_MAJOR 53
static struct cdevsw snp_cdevsw = {
- /* open */ snpopen,
- /* close */ snpclose,
- /* read */ snpread,
- /* write */ snpwrite,
- /* ioctl */ snpioctl,
- /* poll */ snppoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "snp",
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = snpopen,
+ .d_close = snpclose,
+ .d_read = snpread,
+ .d_write = snpwrite,
+ .d_ioctl = snpioctl,
+ .d_poll = snppoll,
+ .d_name = "snp",
+ .d_maj = CDEV_MAJOR,
};
static struct linesw snpdisc = {
diff --git a/sys/dev/sound/midi/midi.c b/sys/dev/sound/midi/midi.c
index 07d2660..2da6415 100644
--- a/sys/dev/sound/midi/midi.c
+++ b/sys/dev/sound/midi/midi.c
@@ -70,19 +70,14 @@ static int midi_readstatus(char *buf, int *ptr, struct uio *uio);
#define CDEV_MAJOR MIDI_CDEV_MAJOR
static struct cdevsw midi_cdevsw = {
- /* open */ midiopen,
- /* close */ midiclose,
- /* read */ midiread,
- /* write */ midiwrite,
- /* ioctl */ midiioctl,
- /* poll */ midipoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "midi",
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = midiopen,
+ .d_close = midiclose,
+ .d_read = midiread,
+ .d_write = midiwrite,
+ .d_ioctl = midiioctl,
+ .d_poll = midipoll,
+ .d_name = "midi",
+ .d_maj = CDEV_MAJOR,
};
/*
diff --git a/sys/dev/sound/midi/sequencer.c b/sys/dev/sound/midi/sequencer.c
index 5115cc9..17c79ef 100644
--- a/sys/dev/sound/midi/sequencer.c
+++ b/sys/dev/sound/midi/sequencer.c
@@ -135,19 +135,14 @@ static d_poll_t seqpoll;
#define CDEV_MAJOR SEQ_CDEV_MAJOR
static struct cdevsw seq_cdevsw = {
- /* open */ seqopen,
- /* close */ seqclose,
- /* read */ seqread,
- /* write */ seqwrite,
- /* ioctl */ seqioctl,
- /* poll */ seqpoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "midi", /* XXX */
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = seqopen,
+ .d_close = seqclose,
+ .d_read = seqread,
+ .d_write = seqwrite,
+ .d_ioctl = seqioctl,
+ .d_poll = seqpoll,
+ .d_name = "midi", /* XXX */
+ .d_maj = CDEV_MAJOR,
};
diff --git a/sys/dev/sound/pcm/dsp.c b/sys/dev/sound/pcm/dsp.c
index cc3c840..838028c 100644
--- a/sys/dev/sound/pcm/dsp.c
+++ b/sys/dev/sound/pcm/dsp.c
@@ -42,19 +42,15 @@ static d_poll_t dsp_poll;
static d_mmap_t dsp_mmap;
static struct cdevsw dsp_cdevsw = {
- /* open */ dsp_open,
- /* close */ dsp_close,
- /* read */ dsp_read,
- /* write */ dsp_write,
- /* ioctl */ dsp_ioctl,
- /* poll */ dsp_poll,
- /* mmap */ dsp_mmap,
- /* strategy */ nostrategy,
- /* name */ "dsp",
- /* maj */ SND_CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = dsp_open,
+ .d_close = dsp_close,
+ .d_read = dsp_read,
+ .d_write = dsp_write,
+ .d_ioctl = dsp_ioctl,
+ .d_poll = dsp_poll,
+ .d_mmap = dsp_mmap,
+ .d_name = "dsp",
+ .d_maj = SND_CDEV_MAJOR,
};
#ifdef USING_DEVFS
diff --git a/sys/dev/sound/pcm/mixer.c b/sys/dev/sound/pcm/mixer.c
index 182d290..ab26016 100644
--- a/sys/dev/sound/pcm/mixer.c
+++ b/sys/dev/sound/pcm/mixer.c
@@ -73,19 +73,11 @@ static d_open_t mixer_open;
static d_close_t mixer_close;
static struct cdevsw mixer_cdevsw = {
- /* open */ mixer_open,
- /* close */ mixer_close,
- /* read */ noread,
- /* write */ nowrite,
- /* ioctl */ mixer_ioctl,
- /* poll */ nopoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "mixer",
- /* maj */ SND_CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = mixer_open,
+ .d_close = mixer_close,
+ .d_ioctl = mixer_ioctl,
+ .d_name = "mixer",
+ .d_maj = SND_CDEV_MAJOR,
};
#ifdef USING_DEVFS
diff --git a/sys/dev/sound/pcm/sndstat.c b/sys/dev/sound/pcm/sndstat.c
index bdaff2b..a15e7f4 100644
--- a/sys/dev/sound/pcm/sndstat.c
+++ b/sys/dev/sound/pcm/sndstat.c
@@ -41,19 +41,11 @@ static d_close_t sndstat_close;
static d_read_t sndstat_read;
static struct cdevsw sndstat_cdevsw = {
- /* open */ sndstat_open,
- /* close */ sndstat_close,
- /* read */ sndstat_read,
- /* write */ nowrite,
- /* ioctl */ noioctl,
- /* poll */ nopoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "sndstat",
- /* maj */ SND_CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = sndstat_open,
+ .d_close = sndstat_close,
+ .d_read = sndstat_read,
+ .d_name = "sndstat",
+ .d_maj = SND_CDEV_MAJOR,
};
struct sndstat_entry {
diff --git a/sys/dev/speaker/spkr.c b/sys/dev/speaker/spkr.c
index 22b6bf3..97fa4e6 100644
--- a/sys/dev/speaker/spkr.c
+++ b/sys/dev/speaker/spkr.c
@@ -34,19 +34,12 @@ static d_ioctl_t spkrioctl;
#define CDEV_MAJOR 26
static struct cdevsw spkr_cdevsw = {
- /* open */ spkropen,
- /* close */ spkrclose,
- /* read */ noread,
- /* write */ spkrwrite,
- /* ioctl */ spkrioctl,
- /* poll */ nopoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "spkr",
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = spkropen,
+ .d_close = spkrclose,
+ .d_write = spkrwrite,
+ .d_ioctl = spkrioctl,
+ .d_name = "spkr",
+ .d_maj = CDEV_MAJOR,
};
static MALLOC_DEFINE(M_SPKR, "spkr", "Speaker buffer");
diff --git a/sys/dev/streams/streams.c b/sys/dev/streams/streams.c
index 4347d99..bd0aab9 100644
--- a/sys/dev/streams/streams.c
+++ b/sys/dev/streams/streams.c
@@ -105,19 +105,9 @@ static struct fileops svr4_netops = {
#define CDEV_MAJOR 103
static struct cdevsw streams_cdevsw = {
- /* open */ streamsopen,
- /* close */ noclose,
- /* read */ noread,
- /* write */ nowrite,
- /* ioctl */ noioctl,
- /* poll */ nopoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "streams",
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = streamsopen,
+ .d_name = "streams",
+ .d_maj = CDEV_MAJOR,
};
struct streams_softc {
diff --git a/sys/dev/syscons/syscons.c b/sys/dev/syscons/syscons.c
index 0edbc49..1cf572b 100644
--- a/sys/dev/syscons/syscons.c
+++ b/sys/dev/syscons/syscons.c
@@ -212,20 +212,17 @@ static d_ioctl_t scioctl;
static d_mmap_t scmmap;
static struct cdevsw sc_cdevsw = {
- /* open */ scopen,
- /* close */ scclose,
- /* read */ scread,
- /* write */ ttywrite,
- /* ioctl */ scioctl,
- /* poll */ ttypoll,
- /* mmap */ scmmap,
- /* strategy */ nostrategy,
- /* name */ "sc",
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ D_TTY | D_KQFILTER,
- /* kqfilter */ ttykqfilter
+ .d_open = scopen,
+ .d_close = scclose,
+ .d_read = scread,
+ .d_write = ttywrite,
+ .d_ioctl = scioctl,
+ .d_poll = ttypoll,
+ .d_mmap = scmmap,
+ .d_name = "sc",
+ .d_maj = CDEV_MAJOR,
+ .d_flags = D_TTY | D_KQFILTER,
+ .d_kqfilter = ttykqfilter
};
int
diff --git a/sys/dev/syscons/sysmouse.c b/sys/dev/syscons/sysmouse.c
index 310052a..db9d2e8 100644
--- a/sys/dev/syscons/sysmouse.c
+++ b/sys/dev/syscons/sysmouse.c
@@ -48,19 +48,14 @@ static d_close_t smclose;
static d_ioctl_t smioctl;
static struct cdevsw sm_cdevsw = {
- /* open */ smopen,
- /* close */ smclose,
- /* read */ ttyread,
- /* write */ nowrite,
- /* ioctl */ smioctl,
- /* poll */ ttypoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "sysmouse",
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ D_TTY,
+ .d_open = smopen,
+ .d_close = smclose,
+ .d_read = ttyread,
+ .d_ioctl = smioctl,
+ .d_poll = ttypoll,
+ .d_name = "sysmouse",
+ .d_maj = CDEV_MAJOR,
+ .d_flags = D_TTY,
};
/* local variables */
diff --git a/sys/dev/tdfx/tdfx_pci.c b/sys/dev/tdfx/tdfx_pci.c
index b8bd39a..6349751 100644
--- a/sys/dev/tdfx/tdfx_pci.c
+++ b/sys/dev/tdfx/tdfx_pci.c
@@ -103,19 +103,12 @@ LINUX_IOCTL_SET(tdfx, LINUX_IOCTL_TDFX_MIN, LINUX_IOCTL_TDFX_MAX);
/* Char. Dev. file operations structure */
static struct cdevsw tdfx_cdev = {
- /* open */ tdfx_open,
- /* close */ tdfx_close,
- /* read */ noread,
- /* write */ nowrite,
- /* ioctl */ tdfx_ioctl,
- /* poll */ nopoll,
- /* mmap */ tdfx_mmap,
- /* strategy */ nostrategy,
- /* name */ "tdfx",
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = tdfx_open,
+ .d_close = tdfx_close,
+ .d_ioctl = tdfx_ioctl,
+ .d_mmap = tdfx_mmap,
+ .d_name = "tdfx",
+ .d_maj = CDEV_MAJOR,
};
static int
diff --git a/sys/dev/tga/tga_pci.c b/sys/dev/tga/tga_pci.c
index 24cf4a9..b6b57f0 100644
--- a/sys/dev/tga/tga_pci.c
+++ b/sys/dev/tga/tga_pci.c
@@ -97,20 +97,14 @@ static struct gfb_type tga_devs[] = {
#ifdef FB_INSTALL_CDEV
static struct cdevsw tga_cdevsw = {
- /* open */ pcigfb_open,
- /* close */ pcigfb_close,
- /* read */ pcigfb_read,
- /* write */ pcigfb_write,
- /* ioctl */ pcigfb_ioctl,
- /* poll */ nopoll,
- /* mmap */ pcigfb_mmap,
- /* strategy */ nostrategy,
- /* name */ "tga",
- /* maj */ -1,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
- /* kqfilter */ nokqfilter
+ .d_open = pcigfb_open,
+ .d_close = pcigfb_close,
+ .d_read = pcigfb_read,
+ .d_write = pcigfb_write,
+ .d_ioctl = pcigfb_ioctl,
+ .d_mmap = pcigfb_mmap,
+ .d_name = "tga",
+ .d_maj = -1,
};
#endif /* FB_INSTALL_CDEV */
diff --git a/sys/dev/ti/if_ti.c b/sys/dev/ti/if_ti.c
index e0ac1d1..be81f61 100644
--- a/sys/dev/ti/if_ti.c
+++ b/sys/dev/ti/if_ti.c
@@ -192,19 +192,11 @@ static d_close_t ti_close;
static d_ioctl_t ti_ioctl2;
static struct cdevsw ti_cdevsw = {
- /* open */ ti_open,
- /* close */ ti_close,
- /* read */ noread,
- /* write */ nowrite,
- /* ioctl */ ti_ioctl2,
- /* poll */ seltrue,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "ti",
- /* maj */ TI_CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = ti_open,
+ .d_close = ti_close,
+ .d_ioctl = ti_ioctl2,
+ .d_name = "ti",
+ .d_maj = TI_CDEV_MAJOR,
};
static int ti_probe (device_t);
diff --git a/sys/dev/twe/twe_freebsd.c b/sys/dev/twe/twe_freebsd.c
index 96c9d5a..a0b6db7 100644
--- a/sys/dev/twe/twe_freebsd.c
+++ b/sys/dev/twe/twe_freebsd.c
@@ -71,19 +71,11 @@ static d_ioctl_t twe_ioctl_wrapper;
#define TWE_CDEV_MAJOR 146
static struct cdevsw twe_cdevsw = {
- /* open */ twe_open,
- /* close */ twe_close,
- /* read */ noread,
- /* write */ nowrite,
- /* ioctl */ twe_ioctl_wrapper,
- /* poll */ nopoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "twe",
- /* maj */ TWE_CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0
+ .d_open = twe_open,
+ .d_close = twe_close,
+ .d_ioctl = twe_ioctl_wrapper,
+ .d_name = "twe",
+ .d_maj = TWE_CDEV_MAJOR,
};
/********************************************************************************
diff --git a/sys/dev/usb/ucom.c b/sys/dev/usb/ucom.c
index 8ed19a6..5409913 100644
--- a/sys/dev/usb/ucom.c
+++ b/sys/dev/usb/ucom.c
@@ -128,23 +128,19 @@ Static d_ioctl_t ucomioctl;
#define UCOM_CDEV_MAJOR 138
static struct cdevsw ucom_cdevsw = {
- /* open */ ucomopen,
- /* close */ ucomclose,
- /* read */ ucomread,
- /* write */ ucomwrite,
- /* ioctl */ ucomioctl,
- /* poll */ ttypoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "ucom",
- /* maj */ UCOM_CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ D_TTY | D_KQFILTER,
+ .d_open = ucomopen,
+ .d_close = ucomclose,
+ .d_read = ucomread,
+ .d_write = ucomwrite,
+ .d_ioctl = ucomioctl,
+ .d_poll = ttypoll,
+ .d_name = "ucom",
+ .d_maj = UCOM_CDEV_MAJOR,
+ .d_flags = D_TTY | D_KQFILTER,
#if __FreeBSD_version < 500014
/* bmaj */ -1,
#endif
- /* kqfilter */ ttykqfilter,
+ .d_kqfilter = ttykqfilter,
};
Static void ucom_cleanup(struct ucom_softc *);
diff --git a/sys/dev/usb/ufm.c b/sys/dev/usb/ufm.c
index 42c7a43..4517d55 100644
--- a/sys/dev/usb/ufm.c
+++ b/sys/dev/usb/ufm.c
@@ -90,19 +90,11 @@ d_ioctl_t ufmioctl;
#define UFM_CDEV_MAJOR MAJOR_AUTO
Static struct cdevsw ufm_cdevsw = {
- /* open */ ufmopen,
- /* close */ ufmclose,
- /* read */ noread,
- /* write */ nowrite,
- /* ioctl */ ufmioctl,
- /* poll */ nopoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "ufm",
- /* maj */ UFM_CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = ufmopen,
+ .d_close = ufmclose,
+ .d_ioctl = ufmioctl,
+ .d_name = "ufm",
+ .d_maj = UFM_CDEV_MAJOR,
#if (__FreeBSD_version < 500014)
-1
#endif
diff --git a/sys/dev/usb/ugen.c b/sys/dev/usb/ugen.c
index 5f997dc..ffecd12 100644
--- a/sys/dev/usb/ugen.c
+++ b/sys/dev/usb/ugen.c
@@ -138,19 +138,14 @@ d_poll_t ugenpoll;
#define UGEN_CDEV_MAJOR 114
Static struct cdevsw ugen_cdevsw = {
- /* open */ ugenopen,
- /* close */ ugenclose,
- /* read */ ugenread,
- /* write */ ugenwrite,
- /* ioctl */ ugenioctl,
- /* poll */ ugenpoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "ugen",
- /* maj */ UGEN_CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = ugenopen,
+ .d_close = ugenclose,
+ .d_read = ugenread,
+ .d_write = ugenwrite,
+ .d_ioctl = ugenioctl,
+ .d_poll = ugenpoll,
+ .d_name = "ugen",
+ .d_maj = UGEN_CDEV_MAJOR,
#if __FreeBSD_version < 500014
/* bmaj */ -1
#endif
diff --git a/sys/dev/usb/uhid.c b/sys/dev/usb/uhid.c
index 2570aa1..68ee1d3 100644
--- a/sys/dev/usb/uhid.c
+++ b/sys/dev/usb/uhid.c
@@ -149,19 +149,14 @@ d_poll_t uhidpoll;
#define UHID_CDEV_MAJOR 122
Static struct cdevsw uhid_cdevsw = {
- /* open */ uhidopen,
- /* close */ uhidclose,
- /* read */ uhidread,
- /* write */ uhidwrite,
- /* ioctl */ uhidioctl,
- /* poll */ uhidpoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "uhid",
- /* maj */ UHID_CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = uhidopen,
+ .d_close = uhidclose,
+ .d_read = uhidread,
+ .d_write = uhidwrite,
+ .d_ioctl = uhidioctl,
+ .d_poll = uhidpoll,
+ .d_name = "uhid",
+ .d_maj = UHID_CDEV_MAJOR,
#if __FreeBSD_version < 500014
/* bmaj */ -1
#endif
diff --git a/sys/dev/usb/ulpt.c b/sys/dev/usb/ulpt.c
index c4fd586..71f6326 100644
--- a/sys/dev/usb/ulpt.c
+++ b/sys/dev/usb/ulpt.c
@@ -147,19 +147,12 @@ Static d_ioctl_t ulptioctl;
#define ULPT_CDEV_MAJOR 113
Static struct cdevsw ulpt_cdevsw = {
- /* open */ ulptopen,
- /* close */ ulptclose,
- /* read */ noread,
- /* write */ ulptwrite,
- /* ioctl */ ulptioctl,
- /* poll */ nopoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "ulpt",
- /* maj */ ULPT_CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = ulptopen,
+ .d_close = ulptclose,
+ .d_write = ulptwrite,
+ .d_ioctl = ulptioctl,
+ .d_name = "ulpt",
+ .d_maj = ULPT_CDEV_MAJOR,
#if __FreeBSD_version < 500014
/* bmaj */ -1
#endif
diff --git a/sys/dev/usb/ums.c b/sys/dev/usb/ums.c
index e313d3e..642d7d5 100644
--- a/sys/dev/usb/ums.c
+++ b/sys/dev/usb/ums.c
@@ -149,19 +149,13 @@ Static d_poll_t ums_poll;
#define UMS_CDEV_MAJOR 111
Static struct cdevsw ums_cdevsw = {
- /* open */ ums_open,
- /* close */ ums_close,
- /* read */ ums_read,
- /* write */ nowrite,
- /* ioctl */ ums_ioctl,
- /* poll */ ums_poll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "ums",
- /* maj */ UMS_CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = ums_open,
+ .d_close = ums_close,
+ .d_read = ums_read,
+ .d_ioctl = ums_ioctl,
+ .d_poll = ums_poll,
+ .d_name = "ums",
+ .d_maj = UMS_CDEV_MAJOR,
#if __FreeBSD_version < 500014
/* bmaj */ -1
#endif
diff --git a/sys/dev/usb/urio.c b/sys/dev/usb/urio.c
index e5f6cc7..3b45bb4 100644
--- a/sys/dev/usb/urio.c
+++ b/sys/dev/usb/urio.c
@@ -116,19 +116,13 @@ d_ioctl_t urioioctl;
#define URIO_CDEV_MAJOR 143
Static struct cdevsw urio_cdevsw = {
- /* open */ urioopen,
- /* close */ urioclose,
- /* read */ urioread,
- /* write */ uriowrite,
- /* ioctl */ urioioctl,
- /* poll */ nopoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "urio",
- /* maj */ URIO_CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = urioopen,
+ .d_close = urioclose,
+ .d_read = urioread,
+ .d_write = uriowrite,
+ .d_ioctl = urioioctl,
+ .d_name = "urio",
+ .d_maj = URIO_CDEV_MAJOR,
#if __FreeBSD_version < 500014
-1
#endif
diff --git a/sys/dev/usb/usb.c b/sys/dev/usb/usb.c
index 21127d6..74d024f 100644
--- a/sys/dev/usb/usb.c
+++ b/sys/dev/usb/usb.c
@@ -136,19 +136,13 @@ d_ioctl_t usbioctl;
d_poll_t usbpoll;
struct cdevsw usb_cdevsw = {
- /* open */ usbopen,
- /* close */ usbclose,
- /* read */ usbread,
- /* write */ nowrite,
- /* ioctl */ usbioctl,
- /* poll */ usbpoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "usb",
- /* maj */ USB_CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = usbopen,
+ .d_close = usbclose,
+ .d_read = usbread,
+ .d_ioctl = usbioctl,
+ .d_poll = usbpoll,
+ .d_name = "usb",
+ .d_maj = USB_CDEV_MAJOR,
#if __FreeBSD_version < 500014
/* bmaj */ -1
#endif
diff --git a/sys/dev/usb/uscanner.c b/sys/dev/usb/uscanner.c
index 80f79ab..13d287b9 100644
--- a/sys/dev/usb/uscanner.c
+++ b/sys/dev/usb/uscanner.c
@@ -249,19 +249,13 @@ d_poll_t uscannerpoll;
#define USCANNER_CDEV_MAJOR 156
Static struct cdevsw uscanner_cdevsw = {
- /* open */ uscanneropen,
- /* close */ uscannerclose,
- /* read */ uscannerread,
- /* write */ uscannerwrite,
- /* ioctl */ noioctl,
- /* poll */ uscannerpoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "uscanner",
- /* maj */ USCANNER_CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = uscanneropen,
+ .d_close = uscannerclose,
+ .d_read = uscannerread,
+ .d_write = uscannerwrite,
+ .d_poll = uscannerpoll,
+ .d_name = "uscanner",
+ .d_maj = USCANNER_CDEV_MAJOR,
#if __FreeBSD_version < 500014
/* bmaj */ -1
#endif
diff --git a/sys/dev/vinum/vinum.c b/sys/dev/vinum/vinum.c
index 4016271..81d7a46 100644
--- a/sys/dev/vinum/vinum.c
+++ b/sys/dev/vinum/vinum.c
@@ -55,19 +55,15 @@ extern struct mc malloced[];
struct cdevsw vinum_cdevsw =
{
- /* open */ vinumopen,
- /* close */ vinumclose,
- /* read */ physread,
- /* write */ physwrite,
- /* ioctl */ vinumioctl,
- /* poll */ seltrue,
- /* mmap */ nommap,
- /* strategy */ vinumstrategy,
- /* name */ "vinum",
- /* maj */ VINUM_CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ D_DISK
+ .d_open = vinumopen,
+ .d_close = vinumclose,
+ .d_read = physread,
+ .d_write = physwrite,
+ .d_ioctl = vinumioctl,
+ .d_strategy = vinumstrategy,
+ .d_name = "vinum",
+ .d_maj = VINUM_CDEV_MAJOR,
+ .d_flags = D_DISK
};
/* Called by main() during pseudo-device attachment. */
diff --git a/sys/dev/zs/zs.c b/sys/dev/zs/zs.c
index 7186521..9ee3cdf 100644
--- a/sys/dev/zs/zs.c
+++ b/sys/dev/zs/zs.c
@@ -150,20 +150,16 @@ static void zsttystop(struct tty *tp, int rw);
static int zsttyparam(struct tty *tp, struct termios *t);
static struct cdevsw zstty_cdevsw = {
- /* open */ zsttyopen,
- /* close */ zsttyclose,
- /* read */ ttyread,
- /* write */ ttywrite,
- /* ioctl */ zsttyioctl,
- /* poll */ ttypoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "zstty",
- /* major */ MAJOR_AUTO,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ D_TTY | D_KQFILTER,
- /* kqfilter */ ttykqfilter,
+ .d_open = zsttyopen,
+ .d_close = zsttyclose,
+ .d_read = ttyread,
+ .d_write = ttywrite,
+ .d_ioctl = zsttyioctl,
+ .d_poll = ttypoll,
+ .d_name = "zstty",
+ .d_maj = MAJOR_AUTO,
+ .d_flags = D_TTY | D_KQFILTER,
+ .d_kqfilter = ttykqfilter,
};
static struct zstty_softc *zstty_cons;
diff --git a/sys/fs/coda/coda_fbsd.c b/sys/fs/coda/coda_fbsd.c
index 6907c63..23ce5e4 100644
--- a/sys/fs/coda/coda_fbsd.c
+++ b/sys/fs/coda/coda_fbsd.c
@@ -66,19 +66,14 @@
#define VC_DEV_NO 93
static struct cdevsw codadevsw = {
- /* open */ vc_nb_open,
- /* close */ vc_nb_close,
- /* read */ vc_nb_read,
- /* write */ vc_nb_write,
- /* ioctl */ vc_nb_ioctl,
- /* poll */ vc_nb_poll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "Coda",
- /* maj */ VC_DEV_NO,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = vc_nb_open,
+ .d_close = vc_nb_close,
+ .d_read = vc_nb_read,
+ .d_write = vc_nb_write,
+ .d_ioctl = vc_nb_ioctl,
+ .d_poll = vc_nb_poll,
+ .d_name = "Coda",
+ .d_maj = VC_DEV_NO,
};
int vcdebug = 1;
diff --git a/sys/geom/geom_ccd.c b/sys/geom/geom_ccd.c
index 4fe4f98..ce4030b 100644
--- a/sys/geom/geom_ccd.c
+++ b/sys/geom/geom_ccd.c
@@ -115,19 +115,11 @@ static d_ioctl_t ccdctlioctl;
#define CDEV_MAJOR 74
static struct cdevsw ccdctl_cdevsw = {
- /* open */ nullopen,
- /* close */ nullclose,
- /* read */ noread,
- /* write */ nowrite,
- /* ioctl */ ccdctlioctl,
- /* poll */ nopoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "ccdctl",
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0
+ .d_open = nullopen,
+ .d_close = nullclose,
+ .d_ioctl = ccdctlioctl,
+ .d_name = "ccdctl",
+ .d_maj = CDEV_MAJOR,
};
static LIST_HEAD(, ccd_s) ccd_softc_list =
diff --git a/sys/geom/geom_dev.c b/sys/geom/geom_dev.c
index 7889081..bd855dc 100644
--- a/sys/geom/geom_dev.c
+++ b/sys/geom/geom_dev.c
@@ -59,20 +59,15 @@ static d_strategy_t g_dev_strategy;
static d_ioctl_t g_dev_ioctl;
static struct cdevsw g_dev_cdevsw = {
- /* open */ g_dev_open,
- /* close */ g_dev_close,
- /* read */ physread,
- /* write */ physwrite,
- /* ioctl */ g_dev_ioctl,
- /* poll */ nopoll,
- /* mmap */ nommap,
- /* strategy */ g_dev_strategy,
- /* name */ "g_dev",
- /* maj */ GEOM_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ D_DISK | D_TRACKCLOSE,
- /* kqfilter */ nokqfilter
+ .d_open = g_dev_open,
+ .d_close = g_dev_close,
+ .d_read = physread,
+ .d_write = physwrite,
+ .d_ioctl = g_dev_ioctl,
+ .d_strategy = g_dev_strategy,
+ .d_name = "g_dev",
+ .d_maj = GEOM_MAJOR,
+ .d_flags = D_DISK | D_TRACKCLOSE,
};
static g_taste_t g_dev_taste;
diff --git a/sys/geom/geom_stats.c b/sys/geom/geom_stats.c
index 2577b2a..20687d7 100644
--- a/sys/geom/geom_stats.c
+++ b/sys/geom/geom_stats.c
@@ -106,19 +106,11 @@ g_stat_delete(struct g_stat *gsp)
static d_mmap_t g_stat_mmap;
static struct cdevsw geom_stats_cdevsw = {
- /* open */ nullopen,
- /* close */ nullclose,
- /* read */ noread,
- /* write */ nowrite,
- /* ioctl */ noioctl,
- /* poll */ nopoll,
- /* mmap */ g_stat_mmap,
- /* strtegy */ nostrategy,
- /* name */ "g_stats",
- /* maj */ GEOM_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = nullopen,
+ .d_close = nullclose,
+ .d_mmap = g_stat_mmap,
+ .d_name = "g_stats",
+ .d_maj = GEOM_MAJOR,
};
static int
diff --git a/sys/i386/acpica/acpi_machdep.c b/sys/i386/acpica/acpi_machdep.c
index fbf649b..c0d8b91 100644
--- a/sys/i386/acpica/acpi_machdep.c
+++ b/sys/i386/acpica/acpi_machdep.c
@@ -64,19 +64,13 @@ static d_poll_t apmpoll;
#define CDEV_MAJOR 39
static struct cdevsw apm_cdevsw = {
- /* open */ apmopen,
- /* close */ apmclose,
- /* read */ noread,
- /* write */ apmwrite,
- /* ioctl */ apmioctl,
- /* poll */ apmpoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "apm",
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = apmopen,
+ .d_close = apmclose,
+ .d_write = apmwrite,
+ .d_ioctl = apmioctl,
+ .d_poll = apmpoll,
+ .d_name = "apm",
+ .d_maj = CDEV_MAJOR,
};
static int
diff --git a/sys/i386/apm/apm.c b/sys/i386/apm/apm.c
index 5279873..66bcdbe 100644
--- a/sys/i386/apm/apm.c
+++ b/sys/i386/apm/apm.c
@@ -90,19 +90,13 @@ static d_poll_t apmpoll;
#define CDEV_MAJOR 39
static struct cdevsw apm_cdevsw = {
- /* open */ apmopen,
- /* close */ apmclose,
- /* read */ noread,
- /* write */ apmwrite,
- /* ioctl */ apmioctl,
- /* poll */ apmpoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "apm",
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = apmopen,
+ .d_close = apmclose,
+ .d_write = apmwrite,
+ .d_ioctl = apmioctl,
+ .d_poll = apmpoll,
+ .d_name = "apm",
+ .d_maj = CDEV_MAJOR,
};
static int apm_suspend_delay = 1;
diff --git a/sys/i386/bios/apm.c b/sys/i386/bios/apm.c
index 5279873..66bcdbe 100644
--- a/sys/i386/bios/apm.c
+++ b/sys/i386/bios/apm.c
@@ -90,19 +90,13 @@ static d_poll_t apmpoll;
#define CDEV_MAJOR 39
static struct cdevsw apm_cdevsw = {
- /* open */ apmopen,
- /* close */ apmclose,
- /* read */ noread,
- /* write */ apmwrite,
- /* ioctl */ apmioctl,
- /* poll */ apmpoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "apm",
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = apmopen,
+ .d_close = apmclose,
+ .d_write = apmwrite,
+ .d_ioctl = apmioctl,
+ .d_poll = apmpoll,
+ .d_name = "apm",
+ .d_maj = CDEV_MAJOR,
};
static int apm_suspend_delay = 1;
diff --git a/sys/i386/bios/smapi.c b/sys/i386/bios/smapi.c
index 038a076..80b8f4c 100644
--- a/sys/i386/bios/smapi.c
+++ b/sys/i386/bios/smapi.c
@@ -54,20 +54,12 @@ static d_ioctl_t smapi_ioctl;
#define CDEV_MAJOR 183
static struct cdevsw smapi_cdevsw = {
- /* open */ smapi_open,
- /* close */ smapi_close,
- /* read */ noread,
- /* write */ nowrite,
- /* ioctl */ smapi_ioctl,
- /* poll */ nopoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "smapi",
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ D_MEM,
- /* kqfilter */ NULL,
+ .d_open = smapi_open,
+ .d_close = smapi_close,
+ .d_ioctl = smapi_ioctl,
+ .d_name = "smapi",
+ .d_maj = CDEV_MAJOR,
+ .d_flags = D_MEM,
};
static int
diff --git a/sys/i386/i386/elan-mmcr.c b/sys/i386/i386/elan-mmcr.c
index bd68670..e0492b50 100644
--- a/sys/i386/i386/elan-mmcr.c
+++ b/sys/i386/i386/elan-mmcr.c
@@ -171,19 +171,13 @@ static d_mmap_t elan_mmap;
#define CDEV_MAJOR 100 /* Share with xrpu */
static struct cdevsw elan_cdevsw = {
- /* open */ nullopen,
- /* close */ nullclose,
- /* read */ noread,
- /* write */ elan_write,
- /* ioctl */ elan_ioctl,
- /* poll */ nopoll,
- /* mmap */ elan_mmap,
- /* strategy */ nostrategy,
- /* name */ "elan",
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = nullopen,
+ .d_close = nullclose,
+ .d_write = elan_write,
+ .d_ioctl = elan_ioctl,
+ .d_mmap = elan_mmap,
+ .d_name = "elan",
+ .d_maj = CDEV_MAJOR,
};
static void
diff --git a/sys/i386/i386/mem.c b/sys/i386/i386/mem.c
index a045d96..cae4f6a 100644
--- a/sys/i386/i386/mem.c
+++ b/sys/i386/i386/mem.c
@@ -78,19 +78,15 @@ static d_mmap_t memmmap;
#define CDEV_MAJOR 2
static struct cdevsw mem_cdevsw = {
- /* open */ mmopen,
- /* close */ mmclose,
- /* read */ mmrw,
- /* write */ mmrw,
- /* ioctl */ mmioctl,
- /* poll */ (d_poll_t *)seltrue,
- /* mmap */ memmmap,
- /* strategy */ nostrategy,
- /* name */ "mem",
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ D_MEM,
+ .d_open = mmopen,
+ .d_close = mmclose,
+ .d_read = mmrw,
+ .d_write = mmrw,
+ .d_ioctl = mmioctl,
+ .d_mmap = memmmap,
+ .d_name = "mem",
+ .d_maj = CDEV_MAJOR,
+ .d_flags = D_MEM,
};
MALLOC_DEFINE(M_MEMDESC, "memdesc", "memory range descriptors");
diff --git a/sys/i386/i386/perfmon.c b/sys/i386/i386/perfmon.c
index e4cca4f..ab6db41 100644
--- a/sys/i386/i386/perfmon.c
+++ b/sys/i386/i386/perfmon.c
@@ -71,19 +71,11 @@ SYSINIT(cpu, SI_SUB_DRIVERS, SI_ORDER_ANY, perfmon_init_dev, NULL);
#define CDEV_MAJOR 2 /* We're really a minor of mem.c */
static struct cdevsw perfmon_cdevsw = {
- /* open */ perfmon_open,
- /* close */ perfmon_close,
- /* read */ noread,
- /* write */ nowrite,
- /* ioctl */ perfmon_ioctl,
- /* poll */ nopoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "perfmon",
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = perfmon_open,
+ .d_close = perfmon_close,
+ .d_ioctl = perfmon_ioctl,
+ .d_name = "perfmon",
+ .d_maj = CDEV_MAJOR,
};
/*
diff --git a/sys/i386/isa/asc.c b/sys/i386/isa/asc.c
index 875dc58..d231807 100644
--- a/sys/i386/isa/asc.c
+++ b/sys/i386/isa/asc.c
@@ -198,19 +198,13 @@ static d_poll_t ascpoll;
#define CDEV_MAJOR 71
static struct cdevsw asc_cdevsw = {
- /* open */ ascopen,
- /* close */ ascclose,
- /* read */ ascread,
- /* write */ nowrite,
- /* ioctl */ ascioctl,
- /* poll */ ascpoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "asc",
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = ascopen,
+ .d_close = ascclose,
+ .d_read = ascread,
+ .d_ioctl = ascioctl,
+ .d_poll = ascpoll,
+ .d_name = "asc",
+ .d_maj = CDEV_MAJOR,
};
#define STATIC static
diff --git a/sys/i386/isa/ctx.c b/sys/i386/isa/ctx.c
index e70c40e..659c27b 100644
--- a/sys/i386/isa/ctx.c
+++ b/sys/i386/isa/ctx.c
@@ -151,19 +151,13 @@ static d_ioctl_t ctxioctl;
#define CDEV_MAJOR 40
static struct cdevsw ctx_cdevsw = {
- /* open */ ctxopen,
- /* close */ ctxclose,
- /* read */ ctxread,
- /* write */ ctxwrite,
- /* ioctl */ ctxioctl,
- /* poll */ nopoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "ctx",
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = ctxopen,
+ .d_close = ctxclose,
+ .d_read = ctxread,
+ .d_write = ctxwrite,
+ .d_ioctl = ctxioctl,
+ .d_name = "ctx",
+ .d_maj = CDEV_MAJOR,
};
diff --git a/sys/i386/isa/cx.c b/sys/i386/isa/cx.c
index e814415..0892a0f 100644
--- a/sys/i386/isa/cx.c
+++ b/sys/i386/isa/cx.c
@@ -73,20 +73,16 @@ static d_ioctl_t cxioctl;
#define CDEV_MAJOR 42
/* Don't make this static, since if_cx.c uses it. */
struct cdevsw cx_cdevsw = {
- /* open */ cxopen,
- /* close */ cxclose,
- /* read */ ttyread,
- /* write */ ttywrite,
- /* ioctl */ cxioctl,
- /* poll */ ttypoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "cx",
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ D_TTY | D_KQFILTER,
- /* kqfilter */ ttykqfilter,
+ .d_open = cxopen,
+ .d_close = cxclose,
+ .d_read = ttyread,
+ .d_write = ttywrite,
+ .d_ioctl = cxioctl,
+ .d_poll = ttypoll,
+ .d_name = "cx",
+ .d_maj = CDEV_MAJOR,
+ .d_flags = D_TTY | D_KQFILTER,
+ .d_kqfilter = ttykqfilter,
};
static void cxoproc (struct tty *tp);
diff --git a/sys/i386/isa/cy.c b/sys/i386/isa/cy.c
index 0d54043..53ea3bc 100644
--- a/sys/i386/isa/cy.c
+++ b/sys/i386/isa/cy.c
@@ -397,20 +397,16 @@ static d_ioctl_t sioioctl;
#define CDEV_MAJOR 48
static struct cdevsw sio_cdevsw = {
- /* open */ sioopen,
- /* close */ sioclose,
- /* read */ ttyread,
- /* write */ siowrite,
- /* ioctl */ sioioctl,
- /* poll */ ttypoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ driver_name,
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ D_TTY | D_KQFILTER,
- /* kqfilter */ ttykqfilter,
+ .d_open = sioopen,
+ .d_close = sioclose,
+ .d_read = ttyread,
+ .d_write = siowrite,
+ .d_ioctl = sioioctl,
+ .d_poll = ttypoll,
+ .d_name = driver_name,
+ .d_maj = CDEV_MAJOR,
+ .d_flags = D_TTY | D_KQFILTER,
+ .d_kqfilter = ttykqfilter,
};
static int comconsole = -1;
diff --git a/sys/i386/isa/gpib.c b/sys/i386/isa/gpib.c
index 0a5a0e0..288775e 100644
--- a/sys/i386/isa/gpib.c
+++ b/sys/i386/isa/gpib.c
@@ -73,19 +73,12 @@ static d_ioctl_t gpioctl;
#define CDEV_MAJOR 44
static struct cdevsw gp_cdevsw = {
- /* open */ gpopen,
- /* close */ gpclose,
- /* read */ noread,
- /* write */ gpwrite,
- /* ioctl */ gpioctl,
- /* poll */ nopoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "gp",
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = gpopen,
+ .d_close = gpclose,
+ .d_write = gpwrite,
+ .d_ioctl = gpioctl,
+ .d_name = "gp",
+ .d_maj = CDEV_MAJOR,
};
#define BUFSIZE 1024
diff --git a/sys/i386/isa/gsc.c b/sys/i386/isa/gsc.c
index 5a94838..b435ced 100644
--- a/sys/i386/isa/gsc.c
+++ b/sys/i386/isa/gsc.c
@@ -193,19 +193,12 @@ static d_ioctl_t gscioctl;
#define CDEV_MAJOR 47
static struct cdevsw gsc_cdevsw = {
- /* open */ gscopen,
- /* close */ gscclose,
- /* read */ gscread,
- /* write */ nowrite,
- /* ioctl */ gscioctl,
- /* poll */ nopoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "gsc",
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = gscopen,
+ .d_close = gscclose,
+ .d_read = gscread,
+ .d_ioctl = gscioctl,
+ .d_name = "gsc",
+ .d_maj = CDEV_MAJOR,
};
diff --git a/sys/i386/isa/istallion.c b/sys/i386/isa/istallion.c
index 35aa836..d988687 100644
--- a/sys/i386/isa/istallion.c
+++ b/sys/i386/isa/istallion.c
@@ -642,20 +642,16 @@ COMPAT_ISA_DRIVER(stli, stlidriver);
#define CDEV_MAJOR 75
static struct cdevsw stli_cdevsw = {
- /* open */ stliopen,
- /* close */ stliclose,
- /* read */ stliread,
- /* write */ stliwrite,
- /* ioctl */ stliioctl,
- /* poll */ ttypoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ stli_drvname,
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ D_TTY | D_KQFILTER,
- /* kqfilter */ ttykqfilter,
+ .d_open = stliopen,
+ .d_close = stliclose,
+ .d_read = stliread,
+ .d_write = stliwrite,
+ .d_ioctl = stliioctl,
+ .d_poll = ttypoll,
+ .d_name = stli_drvname,
+ .d_maj = CDEV_MAJOR,
+ .d_flags = D_TTY | D_KQFILTER,
+ .d_kqfilter = ttykqfilter,
};
#endif
diff --git a/sys/i386/isa/loran.c b/sys/i386/isa/loran.c
index f41338c..47b8b7d 100644
--- a/sys/i386/isa/loran.c
+++ b/sys/i386/isa/loran.c
@@ -622,19 +622,12 @@ struct isa_driver lorandriver = {
COMPAT_ISA_DRIVER(loran, lorandriver);
static struct cdevsw loran_cdevsw = {
- /* open */ loranopen,
- /* close */ loranclose,
- /* read */ loranread,
- /* write */ loranwrite,
- /* ioctl */ noioctl,
- /* poll */ nopoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "loran",
- /* maj */ MAJOR_AUTO,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = loranopen,
+ .d_close = loranclose,
+ .d_read = loranread,
+ .d_write = loranwrite,
+ .d_name = "loran",
+ .d_maj = MAJOR_AUTO,
};
#endif /* _KERNEL */
diff --git a/sys/i386/isa/mse.c b/sys/i386/isa/mse.c
index 17622bd..57b0e7b 100644
--- a/sys/i386/isa/mse.c
+++ b/sys/i386/isa/mse.c
@@ -139,19 +139,13 @@ static d_poll_t msepoll;
#define CDEV_MAJOR 27
static struct cdevsw mse_cdevsw = {
- /* open */ mseopen,
- /* close */ mseclose,
- /* read */ mseread,
- /* write */ nowrite,
- /* ioctl */ mseioctl,
- /* poll */ msepoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "mse",
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = mseopen,
+ .d_close = mseclose,
+ .d_read = mseread,
+ .d_ioctl = mseioctl,
+ .d_poll = msepoll,
+ .d_name = "mse",
+ .d_maj = CDEV_MAJOR,
};
static void mseintr(void *);
diff --git a/sys/i386/isa/pcaudio.c b/sys/i386/isa/pcaudio.c
index 2978471..170407f 100644
--- a/sys/i386/isa/pcaudio.c
+++ b/sys/i386/isa/pcaudio.c
@@ -155,19 +155,13 @@ static d_poll_t pcapoll;
#define CDEV_MAJOR 24
static struct cdevsw pca_cdevsw = {
- /* open */ pcaopen,
- /* close */ pcaclose,
- /* read */ noread,
- /* write */ pcawrite,
- /* ioctl */ pcaioctl,
- /* poll */ pcapoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "pca",
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = pcaopen,
+ .d_close = pcaclose,
+ .d_write = pcawrite,
+ .d_ioctl = pcaioctl,
+ .d_poll = pcapoll,
+ .d_name = "pca",
+ .d_maj = CDEV_MAJOR,
};
static void pca_continue(void);
diff --git a/sys/i386/isa/pcvt/pcvt_drv.c b/sys/i386/isa/pcvt/pcvt_drv.c
index 72a23e0..55570ea 100644
--- a/sys/i386/isa/pcvt/pcvt_drv.c
+++ b/sys/i386/isa/pcvt/pcvt_drv.c
@@ -96,20 +96,17 @@ static d_mmap_t pcvt_mmap;
#define CDEV_MAJOR 12
static struct cdevsw vt_cdevsw = {
- /* open */ pcvt_open,
- /* close */ pcvt_close,
- /* read */ ttyread,
- /* write */ ttywrite,
- /* ioctl */ pcvt_ioctl,
- /* poll */ ttypoll,
- /* mmap */ pcvt_mmap,
- /* strategy */ nostrategy,
- /* name */ "vt",
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ D_TTY | D_KQFILTER,
- /* kqfilter */ ttykqfilter,
+ .d_open = pcvt_open,
+ .d_close = pcvt_close,
+ .d_read = ttyread,
+ .d_write = ttywrite,
+ .d_ioctl = pcvt_ioctl,
+ .d_poll = ttypoll,
+ .d_mmap = pcvt_mmap,
+ .d_name = "vt",
+ .d_maj = CDEV_MAJOR,
+ .d_flags = D_TTY | D_KQFILTER,
+ .d_kqfilter = ttykqfilter,
};
static int pcvt_probe(device_t dev);
diff --git a/sys/i386/isa/spic.c b/sys/i386/isa/spic.c
index 6bc5ac4..7331f74 100644
--- a/sys/i386/isa/spic.c
+++ b/sys/i386/isa/spic.c
@@ -84,19 +84,13 @@ static d_ioctl_t spicioctl;
static d_poll_t spicpoll;
static struct cdevsw spic_cdevsw = {
- /* open */ spicopen,
- /* close */ spicclose,
- /* read */ spicread,
- /* write */ nowrite,
- /* ioctl */ spicioctl,
- /* poll */ spicpoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "spic",
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = spicopen,
+ .d_close = spicclose,
+ .d_read = spicread,
+ .d_ioctl = spicioctl,
+ .d_poll = spicpoll,
+ .d_name = "spic",
+ .d_maj = CDEV_MAJOR,
};
#define SCBUFLEN 128
diff --git a/sys/i386/isa/spigot.c b/sys/i386/isa/spigot.c
index 79ad930..1a7bfec 100644
--- a/sys/i386/isa/spigot.c
+++ b/sys/i386/isa/spigot.c
@@ -106,19 +106,14 @@ static d_mmap_t spigot_mmap;
#define CDEV_MAJOR 11
static struct cdevsw spigot_cdevsw = {
- /* open */ spigot_open,
- /* close */ spigot_close,
- /* read */ spigot_read,
- /* write */ spigot_write,
- /* ioctl */ spigot_ioctl,
- /* poll */ nopoll,
- /* mmap */ spigot_mmap,
- /* strategy */ nostrategy,
- /* name */ "spigot",
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = spigot_open,
+ .d_close = spigot_close,
+ .d_read = spigot_read,
+ .d_write = spigot_write,
+ .d_ioctl = spigot_ioctl,
+ .d_mmap = spigot_mmap,
+ .d_name = "spigot",
+ .d_maj = CDEV_MAJOR,
};
static ointhand2_t spigintr;
diff --git a/sys/i386/isa/spkr.c b/sys/i386/isa/spkr.c
index 22b6bf3..97fa4e6 100644
--- a/sys/i386/isa/spkr.c
+++ b/sys/i386/isa/spkr.c
@@ -34,19 +34,12 @@ static d_ioctl_t spkrioctl;
#define CDEV_MAJOR 26
static struct cdevsw spkr_cdevsw = {
- /* open */ spkropen,
- /* close */ spkrclose,
- /* read */ noread,
- /* write */ spkrwrite,
- /* ioctl */ spkrioctl,
- /* poll */ nopoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "spkr",
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = spkropen,
+ .d_close = spkrclose,
+ .d_write = spkrwrite,
+ .d_ioctl = spkrioctl,
+ .d_name = "spkr",
+ .d_maj = CDEV_MAJOR,
};
static MALLOC_DEFINE(M_SPKR, "spkr", "Speaker buffer");
diff --git a/sys/i386/isa/stallion.c b/sys/i386/isa/stallion.c
index 1d8c666..ebf3534 100644
--- a/sys/i386/isa/stallion.c
+++ b/sys/i386/isa/stallion.c
@@ -536,20 +536,16 @@ COMPAT_PCI_DRIVER (stlpci, stlpcidriver);
#define CDEV_MAJOR 72
static struct cdevsw stl_cdevsw = {
- /* open */ stlopen,
- /* close */ stlclose,
- /* read */ ttyread,
- /* write */ ttywrite,
- /* ioctl */ stlioctl,
- /* poll */ ttypoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "stl",
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ D_TTY | D_KQFILTER,
- /* kqfilter */ ttykqfilter,
+ .d_open = stlopen,
+ .d_close = stlclose,
+ .d_read = ttyread,
+ .d_write = ttywrite,
+ .d_ioctl = stlioctl,
+ .d_poll = ttypoll,
+ .d_name = "stl",
+ .d_maj = CDEV_MAJOR,
+ .d_flags = D_TTY | D_KQFILTER,
+ .d_kqfilter = ttykqfilter,
};
#endif
diff --git a/sys/i386/isa/tw.c b/sys/i386/isa/tw.c
index 3200828..d0d0e65 100644
--- a/sys/i386/isa/tw.c
+++ b/sys/i386/isa/tw.c
@@ -226,19 +226,13 @@ static d_poll_t twpoll;
#define CDEV_MAJOR 19
static struct cdevsw tw_cdevsw = {
- /* open */ twopen,
- /* close */ twclose,
- /* read */ twread,
- /* write */ twwrite,
- /* ioctl */ noioctl,
- /* poll */ twpoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "tw",
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = twopen,
+ .d_close = twclose,
+ .d_read = twread,
+ .d_write = twwrite,
+ .d_poll = twpoll,
+ .d_name = "tw",
+ .d_maj = CDEV_MAJOR,
};
/*
diff --git a/sys/i386/isa/wt.c b/sys/i386/isa/wt.c
index 64356e7..e29664d 100644
--- a/sys/i386/isa/wt.c
+++ b/sys/i386/isa/wt.c
@@ -186,19 +186,14 @@ static d_strategy_t wtstrategy;
#define CDEV_MAJOR 10
static struct cdevsw wt_cdevsw = {
- /* open */ wtopen,
- /* close */ wtclose,
- /* read */ physread,
- /* write */ physwrite,
- /* ioctl */ wtioctl,
- /* poll */ nopoll,
- /* mmap */ nommap,
- /* strategy */ wtstrategy,
- /* name */ "wt",
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = wtopen,
+ .d_close = wtclose,
+ .d_read = physread,
+ .d_write = physwrite,
+ .d_ioctl = wtioctl,
+ .d_strategy = wtstrategy,
+ .d_name = "wt",
+ .d_maj = CDEV_MAJOR,
};
diff --git a/sys/i386/smapi/smapi.c b/sys/i386/smapi/smapi.c
index 038a076..80b8f4c 100644
--- a/sys/i386/smapi/smapi.c
+++ b/sys/i386/smapi/smapi.c
@@ -54,20 +54,12 @@ static d_ioctl_t smapi_ioctl;
#define CDEV_MAJOR 183
static struct cdevsw smapi_cdevsw = {
- /* open */ smapi_open,
- /* close */ smapi_close,
- /* read */ noread,
- /* write */ nowrite,
- /* ioctl */ smapi_ioctl,
- /* poll */ nopoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "smapi",
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ D_MEM,
- /* kqfilter */ NULL,
+ .d_open = smapi_open,
+ .d_close = smapi_close,
+ .d_ioctl = smapi_ioctl,
+ .d_name = "smapi",
+ .d_maj = CDEV_MAJOR,
+ .d_flags = D_MEM,
};
static int
diff --git a/sys/i4b/driver/i4b_ctl.c b/sys/i4b/driver/i4b_ctl.c
index 9a2b789..4eb03c3 100644
--- a/sys/i4b/driver/i4b_ctl.c
+++ b/sys/i4b/driver/i4b_ctl.c
@@ -59,19 +59,12 @@ static d_poll_t i4bctlpoll;
#define CDEV_MAJOR 55
static struct cdevsw i4bctl_cdevsw = {
- /* open */ i4bctlopen,
- /* close */ i4bctlclose,
- /* read */ noread,
- /* write */ nowrite,
- /* ioctl */ i4bctlioctl,
- /* poll */ i4bctlpoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "i4bctl",
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = i4bctlopen,
+ .d_close = i4bctlclose,
+ .d_ioctl = i4bctlioctl,
+ .d_poll = i4bctlpoll,
+ .d_name = "i4bctl",
+ .d_maj = CDEV_MAJOR,
};
static void i4bctlattach(void *);
diff --git a/sys/i4b/driver/i4b_rbch.c b/sys/i4b/driver/i4b_rbch.c
index 63b941d..ebd4866 100644
--- a/sys/i4b/driver/i4b_rbch.c
+++ b/sys/i4b/driver/i4b_rbch.c
@@ -113,19 +113,14 @@ static d_poll_t i4brbchpoll;
#define CDEV_MAJOR 57
static struct cdevsw i4brbch_cdevsw = {
- /* open */ i4brbchopen,
- /* close */ i4brbchclose,
- /* read */ i4brbchread,
- /* write */ i4brbchwrite,
- /* ioctl */ i4brbchioctl,
- /* poll */ i4brbchpoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "i4brbch",
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = i4brbchopen,
+ .d_close = i4brbchclose,
+ .d_read = i4brbchread,
+ .d_write = i4brbchwrite,
+ .d_ioctl = i4brbchioctl,
+ .d_poll = i4brbchpoll,
+ .d_name = "i4brbch",
+ .d_maj = CDEV_MAJOR,
};
static void i4brbchattach(void *);
diff --git a/sys/i4b/driver/i4b_tel.c b/sys/i4b/driver/i4b_tel.c
index 3792e86..231886d 100644
--- a/sys/i4b/driver/i4b_tel.c
+++ b/sys/i4b/driver/i4b_tel.c
@@ -136,19 +136,14 @@ static d_poll_t i4btelpoll;
#define CDEV_MAJOR 56
static struct cdevsw i4btel_cdevsw = {
- /* open */ i4btelopen,
- /* close */ i4btelclose,
- /* read */ i4btelread,
- /* write */ i4btelwrite,
- /* ioctl */ i4btelioctl,
- /* poll */ i4btelpoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "i4btel",
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = i4btelopen,
+ .d_close = i4btelclose,
+ .d_read = i4btelread,
+ .d_write = i4btelwrite,
+ .d_ioctl = i4btelioctl,
+ .d_poll = i4btelpoll,
+ .d_name = "i4btel",
+ .d_maj = CDEV_MAJOR,
};
static void i4btelattach(void *);
diff --git a/sys/i4b/driver/i4b_trace.c b/sys/i4b/driver/i4b_trace.c
index a8201a4..d7c89e0 100644
--- a/sys/i4b/driver/i4b_trace.c
+++ b/sys/i4b/driver/i4b_trace.c
@@ -76,19 +76,13 @@ static d_poll_t i4btrcpoll;
#define CDEV_MAJOR 59
static struct cdevsw i4btrc_cdevsw = {
- /* open */ i4btrcopen,
- /* close */ i4btrcclose,
- /* read */ i4btrcread,
- /* write */ nowrite,
- /* ioctl */ i4btrcioctl,
- /* poll */ i4btrcpoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "i4btrc",
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = i4btrcopen,
+ .d_close = i4btrcclose,
+ .d_read = i4btrcread,
+ .d_ioctl = i4btrcioctl,
+ .d_poll = i4btrcpoll,
+ .d_name = "i4btrc",
+ .d_maj = CDEV_MAJOR,
};
static void i4btrcattach(void *);
diff --git a/sys/i4b/layer4/i4b_i4bdrv.c b/sys/i4b/layer4/i4b_i4bdrv.c
index 6d4a107..24d896a 100644
--- a/sys/i4b/layer4/i4b_i4bdrv.c
+++ b/sys/i4b/layer4/i4b_i4bdrv.c
@@ -79,19 +79,13 @@ static d_poll_t i4bpoll;
#define CDEV_MAJOR 60
static struct cdevsw i4b_cdevsw = {
- /* open */ i4bopen,
- /* close */ i4bclose,
- /* read */ i4bread,
- /* write */ nowrite,
- /* ioctl */ i4bioctl,
- /* poll */ i4bpoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "i4b",
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = i4bopen,
+ .d_close = i4bclose,
+ .d_read = i4bread,
+ .d_ioctl = i4bioctl,
+ .d_poll = i4bpoll,
+ .d_name = "i4b",
+ .d_maj = CDEV_MAJOR,
};
static void i4battach(void *);
diff --git a/sys/ia64/ia64/mem.c b/sys/ia64/ia64/mem.c
index 146b684..f83da08 100644
--- a/sys/ia64/ia64/mem.c
+++ b/sys/ia64/ia64/mem.c
@@ -82,19 +82,15 @@ static d_mmap_t memmmap;
#define CDEV_MAJOR 2
static struct cdevsw mem_cdevsw = {
- /* open */ mmopen,
- /* close */ mmclose,
- /* read */ mmrw,
- /* write */ mmrw,
- /* ioctl */ mmioctl,
- /* poll */ (d_poll_t *)seltrue,
- /* mmap */ memmmap,
- /* strategy */ nostrategy,
- /* name */ "mem",
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ D_MEM,
+ .d_open = mmopen,
+ .d_close = mmclose,
+ .d_read = mmrw,
+ .d_write = mmrw,
+ .d_ioctl = mmioctl,
+ .d_mmap = memmmap,
+ .d_name = "mem",
+ .d_maj = CDEV_MAJOR,
+ .d_flags = D_MEM,
};
struct mem_range_softc mem_range_softc;
diff --git a/sys/ia64/ia64/ssc.c b/sys/ia64/ia64/ssc.c
index e552ffd..8bacab9 100644
--- a/sys/ia64/ia64/ssc.c
+++ b/sys/ia64/ia64/ssc.c
@@ -59,19 +59,14 @@ static d_ioctl_t sscioctl;
#define CDEV_MAJOR 97
static struct cdevsw ssc_cdevsw = {
- /* open */ sscopen,
- /* close */ sscclose,
- /* read */ ttyread,
- /* write */ ttywrite,
- /* ioctl */ sscioctl,
- /* poll */ ttypoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "ssc",
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = sscopen,
+ .d_close = sscclose,
+ .d_read = ttyread,
+ .d_write = ttywrite,
+ .d_ioctl = sscioctl,
+ .d_poll = ttypoll,
+ .d_name = "ssc",
+ .d_maj = CDEV_MAJOR,
};
static struct tty *ssc_tp = NULL;
diff --git a/sys/isa/fd.c b/sys/isa/fd.c
index 9173564..bb2cc86 100644
--- a/sys/isa/fd.c
+++ b/sys/isa/fd.c
@@ -477,19 +477,15 @@ fdin_rd(fdc_p fdc)
#define CDEV_MAJOR 9
static struct cdevsw fd_cdevsw = {
- /* open */ Fdopen,
- /* close */ fdclose,
- /* read */ physread,
- /* write */ physwrite,
- /* ioctl */ fdioctl,
- /* poll */ nopoll,
- /* mmap */ nommap,
- /* strategy */ fdstrategy,
- /* name */ "fd",
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ D_DISK,
+ .d_open = Fdopen,
+ .d_close = fdclose,
+ .d_read = physread,
+ .d_write = physwrite,
+ .d_ioctl = fdioctl,
+ .d_strategy = fdstrategy,
+ .d_name = "fd",
+ .d_maj = CDEV_MAJOR,
+ .d_flags = D_DISK,
};
/*
diff --git a/sys/isa/psm.c b/sys/isa/psm.c
index 5b4cc20..968491d 100644
--- a/sys/isa/psm.c
+++ b/sys/isa/psm.c
@@ -326,19 +326,13 @@ static driver_t psm_driver = {
#define CDEV_MAJOR 21
static struct cdevsw psm_cdevsw = {
- /* open */ psmopen,
- /* close */ psmclose,
- /* read */ psmread,
- /* write */ nowrite,
- /* ioctl */ psmioctl,
- /* poll */ psmpoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ PSM_DRIVER_NAME,
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = psmopen,
+ .d_close = psmclose,
+ .d_read = psmread,
+ .d_ioctl = psmioctl,
+ .d_poll = psmpoll,
+ .d_name = PSM_DRIVER_NAME,
+ .d_maj = CDEV_MAJOR,
};
/* debug message level */
diff --git a/sys/isa/vga_isa.c b/sys/isa/vga_isa.c
index 9e7e61b..52844f3 100644
--- a/sys/isa/vga_isa.c
+++ b/sys/isa/vga_isa.c
@@ -69,19 +69,14 @@ static d_ioctl_t isavga_ioctl;
static d_mmap_t isavga_mmap;
static struct cdevsw isavga_cdevsw = {
- /* open */ isavga_open,
- /* close */ isavga_close,
- /* read */ isavga_read,
- /* write */ isavga_write,
- /* ioctl */ isavga_ioctl,
- /* poll */ nopoll,
- /* mmap */ isavga_mmap,
- /* strategy */ nostrategy,
- /* name */ VGA_DRIVER_NAME,
- /* maj */ -1,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = isavga_open,
+ .d_close = isavga_close,
+ .d_read = isavga_read,
+ .d_write = isavga_write,
+ .d_ioctl = isavga_ioctl,
+ .d_mmap = isavga_mmap,
+ .d_name = VGA_DRIVER_NAME,
+ .d_maj = -1,
};
#endif /* FB_INSTALL_CDEV */
diff --git a/sys/kern/kern_conf.c b/sys/kern/kern_conf.c
index d1794fa..4606fd6 100644
--- a/sys/kern/kern_conf.c
+++ b/sys/kern/kern_conf.c
@@ -95,20 +95,18 @@ dead_strategy(struct bio *bp)
#define dead_kqfilter (d_kqfilter_t *)enxio
static struct cdevsw dead_cdevsw = {
- /* open */ dead_open,
- /* close */ dead_close,
- /* read */ dead_read,
- /* write */ dead_write,
- /* ioctl */ dead_ioctl,
- /* poll */ dead_poll,
- /* mmap */ dead_mmap,
- /* strategy */ dead_strategy,
- /* name */ "dead",
- /* maj */ 255,
- /* dump */ dead_dump,
- /* psize */ nopsize,
- /* flags */ 0,
- /* kqfilter */ dead_kqfilter
+ .d_open = dead_open,
+ .d_close = dead_close,
+ .d_read = dead_read,
+ .d_write = dead_write,
+ .d_ioctl = dead_ioctl,
+ .d_poll = dead_poll,
+ .d_mmap = dead_mmap,
+ .d_strategy = dead_strategy,
+ .d_name = "dead",
+ .d_maj = 255,
+ .d_dump = dead_dump,
+ .d_kqfilter = dead_kqfilter
};
diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c
index 109b8ae..0d02974 100644
--- a/sys/kern/kern_descrip.c
+++ b/sys/kern/kern_descrip.c
@@ -83,19 +83,9 @@ static d_open_t fdopen;
#define CDEV_MAJOR 22
static struct cdevsw fildesc_cdevsw = {
- /* open */ fdopen,
- /* close */ noclose,
- /* read */ noread,
- /* write */ nowrite,
- /* ioctl */ noioctl,
- /* poll */ nopoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "FD",
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = fdopen,
+ .d_name = "FD",
+ .d_maj = CDEV_MAJOR,
};
/* How to treat 'new' parameter when allocating a fd for do_dup(). */
diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c
index 90b432b..75529a0 100644
--- a/sys/kern/subr_bus.c
+++ b/sys/kern/subr_bus.c
@@ -217,19 +217,13 @@ static d_poll_t devpoll;
#define CDEV_MAJOR 173
static struct cdevsw dev_cdevsw = {
- /* open */ devopen,
- /* close */ devclose,
- /* read */ devread,
- /* write */ nowrite,
- /* ioctl */ devioctl,
- /* poll */ devpoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "devctl",
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = devopen,
+ .d_close = devclose,
+ .d_read = devread,
+ .d_ioctl = devioctl,
+ .d_poll = devpoll,
+ .d_name = "devctl",
+ .d_maj = CDEV_MAJOR,
};
struct dev_event_info
diff --git a/sys/kern/subr_log.c b/sys/kern/subr_log.c
index c506e9e..97644c1 100644
--- a/sys/kern/subr_log.c
+++ b/sys/kern/subr_log.c
@@ -67,19 +67,13 @@ static void logtimeout(void *arg);
#define CDEV_MAJOR 7
static struct cdevsw log_cdevsw = {
- /* open */ logopen,
- /* close */ logclose,
- /* read */ logread,
- /* write */ nowrite,
- /* ioctl */ logioctl,
- /* poll */ logpoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "log",
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = logopen,
+ .d_close = logclose,
+ .d_read = logread,
+ .d_ioctl = logioctl,
+ .d_poll = logpoll,
+ .d_name = "log",
+ .d_maj = CDEV_MAJOR,
};
static struct logsoftc {
diff --git a/sys/kern/tty_cons.c b/sys/kern/tty_cons.c
index e672eac..e536b45 100644
--- a/sys/kern/tty_cons.c
+++ b/sys/kern/tty_cons.c
@@ -71,20 +71,16 @@ static d_kqfilter_t cnkqfilter;
#define CDEV_MAJOR 0
static struct cdevsw cn_cdevsw = {
- /* open */ cnopen,
- /* close */ cnclose,
- /* read */ cnread,
- /* write */ cnwrite,
- /* ioctl */ cnioctl,
- /* poll */ cnpoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "console",
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ D_TTY | D_KQFILTER,
- /* kqfilter */ cnkqfilter,
+ .d_open = cnopen,
+ .d_close = cnclose,
+ .d_read = cnread,
+ .d_write = cnwrite,
+ .d_ioctl = cnioctl,
+ .d_poll = cnpoll,
+ .d_name = "console",
+ .d_maj = CDEV_MAJOR,
+ .d_flags = D_TTY | D_KQFILTER,
+ .d_kqfilter = cnkqfilter,
};
struct cn_device {
diff --git a/sys/kern/tty_pty.c b/sys/kern/tty_pty.c
index 83f2b9c..1561eb1 100644
--- a/sys/kern/tty_pty.c
+++ b/sys/kern/tty_pty.c
@@ -77,38 +77,30 @@ static d_poll_t ptcpoll;
#define CDEV_MAJOR_S 5
static struct cdevsw pts_cdevsw = {
- /* open */ ptsopen,
- /* close */ ptsclose,
- /* read */ ptsread,
- /* write */ ptswrite,
- /* ioctl */ ptyioctl,
- /* poll */ ttypoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "pts",
- /* maj */ CDEV_MAJOR_S,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ D_TTY | D_KQFILTER,
- /* kqfilter */ ttykqfilter,
+ .d_open = ptsopen,
+ .d_close = ptsclose,
+ .d_read = ptsread,
+ .d_write = ptswrite,
+ .d_ioctl = ptyioctl,
+ .d_poll = ttypoll,
+ .d_name = "pts",
+ .d_maj = CDEV_MAJOR_S,
+ .d_flags = D_TTY | D_KQFILTER,
+ .d_kqfilter = ttykqfilter,
};
#define CDEV_MAJOR_C 6
static struct cdevsw ptc_cdevsw = {
- /* open */ ptcopen,
- /* close */ ptcclose,
- /* read */ ptcread,
- /* write */ ptcwrite,
- /* ioctl */ ptyioctl,
- /* poll */ ptcpoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "ptc",
- /* maj */ CDEV_MAJOR_C,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ D_TTY | D_KQFILTER,
- /* kqfilter */ ttykqfilter,
+ .d_open = ptcopen,
+ .d_close = ptcclose,
+ .d_read = ptcread,
+ .d_write = ptcwrite,
+ .d_ioctl = ptyioctl,
+ .d_poll = ptcpoll,
+ .d_name = "ptc",
+ .d_maj = CDEV_MAJOR_C,
+ .d_flags = D_TTY | D_KQFILTER,
+ .d_kqfilter = ttykqfilter,
};
#define BUFSIZ 100 /* Chunk size iomoved to/from user */
diff --git a/sys/kern/tty_tty.c b/sys/kern/tty_tty.c
index 52fc4db..cdeaa41 100644
--- a/sys/kern/tty_tty.c
+++ b/sys/kern/tty_tty.c
@@ -37,19 +37,11 @@ static d_open_t cttyopen;
#define CDEV_MAJOR 1
static struct cdevsw ctty_cdevsw = {
- /* open */ cttyopen,
- /* close */ nullclose,
- /* read */ noread,
- /* write */ nowrite,
- /* ioctl */ noioctl,
- /* poll */ nopoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "ctty",
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ D_TTY,
+ .d_open = cttyopen,
+ .d_close = nullclose,
+ .d_name = "ctty",
+ .d_maj = CDEV_MAJOR,
+ .d_flags = D_TTY,
};
static dev_t ctty;
diff --git a/sys/net/bpf.c b/sys/net/bpf.c
index 38ae861..a27cd3b 100644
--- a/sys/net/bpf.c
+++ b/sys/net/bpf.c
@@ -121,19 +121,14 @@ static d_poll_t bpfpoll;
#define CDEV_MAJOR 23
static struct cdevsw bpf_cdevsw = {
- /* open */ bpfopen,
- /* close */ bpfclose,
- /* read */ bpfread,
- /* write */ bpfwrite,
- /* ioctl */ bpfioctl,
- /* poll */ bpfpoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "bpf",
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = bpfopen,
+ .d_close = bpfclose,
+ .d_read = bpfread,
+ .d_write = bpfwrite,
+ .d_ioctl = bpfioctl,
+ .d_poll = bpfpoll,
+ .d_name = "bpf",
+ .d_maj = CDEV_MAJOR,
};
diff --git a/sys/net/if.c b/sys/net/if.c
index cdf5fd3..bad9780 100644
--- a/sys/net/if.c
+++ b/sys/net/if.c
@@ -131,20 +131,13 @@ static d_ioctl_t netioctl;
static d_kqfilter_t netkqfilter;
static struct cdevsw net_cdevsw = {
- /* open */ netopen,
- /* close */ netclose,
- /* read */ noread,
- /* write */ nowrite,
- /* ioctl */ netioctl,
- /* poll */ nopoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "net",
- /* maj */ MAJOR_AUTO,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ D_KQFILTER,
- /* kqfilter */ netkqfilter,
+ .d_open = netopen,
+ .d_close = netclose,
+ .d_ioctl = netioctl,
+ .d_name = "net",
+ .d_maj = MAJOR_AUTO,
+ .d_flags = D_KQFILTER,
+ .d_kqfilter = netkqfilter,
};
static int
diff --git a/sys/net/if_tap.c b/sys/net/if_tap.c
index 388ca60..3ac2be8 100644
--- a/sys/net/if_tap.c
+++ b/sys/net/if_tap.c
@@ -101,19 +101,14 @@ static d_ioctl_t tapioctl;
static d_poll_t tappoll;
static struct cdevsw tap_cdevsw = {
- /* open */ tapopen,
- /* close */ tapclose,
- /* read */ tapread,
- /* write */ tapwrite,
- /* ioctl */ tapioctl,
- /* poll */ tappoll,
- /* mmap */ nommap,
- /* startegy */ nostrategy,
- /* dev name */ CDEV_NAME,
- /* dev major */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = tapopen,
+ .d_close = tapclose,
+ .d_read = tapread,
+ .d_write = tapwrite,
+ .d_ioctl = tapioctl,
+ .d_poll = tappoll,
+ .d_name = CDEV_NAME,
+ .d_maj = CDEV_MAJOR,
};
static int tapdebug = 0; /* debug flag */
diff --git a/sys/net/if_tun.c b/sys/net/if_tun.c
index 1c7d61e..e0b3c97 100644
--- a/sys/net/if_tun.c
+++ b/sys/net/if_tun.c
@@ -81,19 +81,14 @@ static d_poll_t tunpoll;
#define CDEV_MAJOR 52
static struct cdevsw tun_cdevsw = {
- /* open */ tunopen,
- /* close */ tunclose,
- /* read */ tunread,
- /* write */ tunwrite,
- /* ioctl */ tunioctl,
- /* poll */ tunpoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ TUNNAME,
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = tunopen,
+ .d_close = tunclose,
+ .d_read = tunread,
+ .d_write = tunwrite,
+ .d_ioctl = tunioctl,
+ .d_poll = tunpoll,
+ .d_name = TUNNAME,
+ .d_maj = CDEV_MAJOR,
};
static void
diff --git a/sys/netgraph/ng_device.c b/sys/netgraph/ng_device.c
index 956b7cf..e679d4e 100644
--- a/sys/netgraph/ng_device.c
+++ b/sys/netgraph/ng_device.c
@@ -114,19 +114,14 @@ static d_poll_t ngdpoll;
#define NGD_CDEV_MAJOR 20
static struct cdevsw ngd_cdevsw = {
- /* open */ ngdopen,
- /* close */ ngdclose,
- /* read */ ngdread,
- /* write */ ngdwrite,
- /* ioctl */ ngdioctl,
- /* poll */ ngdpoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "ngd",
- /* maj */ NGD_CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = ngdopen,
+ .d_close = ngdclose,
+ .d_read = ngdread,
+ .d_write = ngdwrite,
+ .d_ioctl = ngdioctl,
+ .d_poll = ngdpoll,
+ .d_name = "ngd",
+ .d_maj = NGD_CDEV_MAJOR,
};
/*
diff --git a/sys/netncp/ncp_mod.c b/sys/netncp/ncp_mod.c
index 877528c..889d620 100644
--- a/sys/netncp/ncp_mod.c
+++ b/sys/netncp/ncp_mod.c
@@ -64,19 +64,11 @@ static dev_t ncp_dev;
static d_ioctl_t ncp_ioctl;
static struct cdevsw ncp_cdevsw = {
- /* open */ nullopen,
- /* close */ nullclose,
- /* read */ noread,
- /* write */ nowrite,
- /* ioctl */ ncp_ioctl,
- /* poll */ nopoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "ncp",
- /* maj */ MAJOR_AUTO,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0
+ .d_open = nullopen,
+ .d_close = nullclose,
+ .d_ioctl = ncp_ioctl,
+ .d_name = "ncp",
+ .d_maj = MAJOR_AUTO,
};
static int ncp_conn_frag_rq(struct ncp_conn *, struct thread *,
diff --git a/sys/netsmb/smb_dev.c b/sys/netsmb/smb_dev.c
index 3ee11d2..a22507c 100644
--- a/sys/netsmb/smb_dev.c
+++ b/sys/netsmb/smb_dev.c
@@ -85,19 +85,11 @@ int smb_dev_queue(struct smb_dev *ndp, struct smb_rq *rqp, int prio);
*/
static struct cdevsw nsmb_cdevsw = {
- /* open */ nsmb_dev_open,
- /* close */ nsmb_dev_close,
- /* read */ noread,
- /* write */ nowrite,
- /* ioctl */ nsmb_dev_ioctl,
- /* poll */ nopoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ NSMB_NAME,
- /* maj */ NSMB_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = nsmb_dev_open,
+ .d_close = nsmb_dev_close,
+ .d_ioctl = nsmb_dev_ioctl,
+ .d_name = NSMB_NAME,
+ .d_maj = NSMB_MAJOR,
#ifndef FB_CURRENT
/* bmaj */ -1
#endif
diff --git a/sys/opencrypto/cryptodev.c b/sys/opencrypto/cryptodev.c
index d8487f4..a40c859 100644
--- a/sys/opencrypto/cryptodev.c
+++ b/sys/opencrypto/cryptodev.c
@@ -747,20 +747,13 @@ cryptoioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td)
#define CRYPTO_MAJOR 70 /* from openbsd */
static struct cdevsw crypto_cdevsw = {
- /* open */ cryptoopen,
- /* close */ nullclose,
- /* read */ cryptoread,
- /* write */ cryptowrite,
- /* ioctl */ cryptoioctl,
- /* poll */ nopoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* dev name */ "crypto",
- /* dev major */ CRYPTO_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
- /* kqfilter */ NULL
+ .d_open = cryptoopen,
+ .d_close = nullclose,
+ .d_read = cryptoread,
+ .d_write = cryptowrite,
+ .d_ioctl = cryptoioctl,
+ .d_name = "crypto",
+ .d_maj = CRYPTO_MAJOR,
};
static dev_t crypto_dev;
diff --git a/sys/pc98/apm/apm.c b/sys/pc98/apm/apm.c
index 1eb910e..48b2ce7 100644
--- a/sys/pc98/apm/apm.c
+++ b/sys/pc98/apm/apm.c
@@ -107,19 +107,13 @@ static d_poll_t apmpoll;
#define CDEV_MAJOR 39
static struct cdevsw apm_cdevsw = {
- /* open */ apmopen,
- /* close */ apmclose,
- /* read */ noread,
- /* write */ apmwrite,
- /* ioctl */ apmioctl,
- /* poll */ apmpoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "apm",
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = apmopen,
+ .d_close = apmclose,
+ .d_write = apmwrite,
+ .d_ioctl = apmioctl,
+ .d_poll = apmpoll,
+ .d_name = "apm",
+ .d_maj = CDEV_MAJOR,
};
static int apm_suspend_delay = 1;
diff --git a/sys/pc98/cbus/fdc.c b/sys/pc98/cbus/fdc.c
index 98b9622..05d6ab9 100644
--- a/sys/pc98/cbus/fdc.c
+++ b/sys/pc98/cbus/fdc.c
@@ -620,19 +620,15 @@ fdin_rd(fdc_p fdc)
#define CDEV_MAJOR 9
static struct cdevsw fd_cdevsw = {
- /* open */ Fdopen,
- /* close */ fdclose,
- /* read */ physread,
- /* write */ physwrite,
- /* ioctl */ fdioctl,
- /* poll */ nopoll,
- /* mmap */ nommap,
- /* strategy */ fdstrategy,
- /* name */ "fd",
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ D_DISK,
+ .d_open = Fdopen,
+ .d_close = fdclose,
+ .d_read = physread,
+ .d_write = physwrite,
+ .d_ioctl = fdioctl,
+ .d_strategy = fdstrategy,
+ .d_name = "fd",
+ .d_maj = CDEV_MAJOR,
+ .d_flags = D_DISK,
};
/*
diff --git a/sys/pc98/cbus/gdc.c b/sys/pc98/cbus/gdc.c
index 6525c5b..01a63ad 100644
--- a/sys/pc98/cbus/gdc.c
+++ b/sys/pc98/cbus/gdc.c
@@ -102,19 +102,14 @@ static d_ioctl_t gdcioctl;
static d_mmap_t gdcmmap;
static struct cdevsw gdc_cdevsw = {
- /* open */ gdcopen,
- /* close */ gdcclose,
- /* read */ gdcread,
- /* write */ gdcwrite,
- /* ioctl */ gdcioctl,
- /* poll */ nopoll,
- /* mmap */ gdcmmap,
- /* strategy */ nostrategy,
- /* name */ DRIVER_NAME,
- /* maj */ -1,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = gdcopen,
+ .d_close = gdcclose,
+ .d_read = gdcread,
+ .d_write = gdcwrite,
+ .d_ioctl = gdcioctl,
+ .d_mmap = gdcmmap,
+ .d_name = DRIVER_NAME,
+ .d_maj = -1,
};
#endif /* FB_INSTALL_CDEV */
diff --git a/sys/pc98/cbus/olpt.c b/sys/pc98/cbus/olpt.c
index 6e41a42..e54b143 100644
--- a/sys/pc98/cbus/olpt.c
+++ b/sys/pc98/cbus/olpt.c
@@ -232,19 +232,12 @@ static d_ioctl_t lptioctl;
#define CDEV_MAJOR 16
static struct cdevsw lpt_cdevsw = {
- /* open */ lptopen,
- /* close */ lptclose,
- /* read */ noread,
- /* write */ lptwrite,
- /* ioctl */ lptioctl,
- /* poll */ nopoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "lpt",
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = lptopen,
+ .d_close = lptclose,
+ .d_write = lptwrite,
+ .d_ioctl = lptioctl,
+ .d_name = "lpt",
+ .d_maj = CDEV_MAJOR,
};
static bus_addr_t lpt_iat[] = {0, 2, 4, 6};
diff --git a/sys/pc98/cbus/sio.c b/sys/pc98/cbus/sio.c
index 18f1483..3ec2bee 100644
--- a/sys/pc98/cbus/sio.c
+++ b/sys/pc98/cbus/sio.c
@@ -407,20 +407,16 @@ static d_ioctl_t sioioctl;
#define CDEV_MAJOR 28
static struct cdevsw sio_cdevsw = {
- /* open */ sioopen,
- /* close */ sioclose,
- /* read */ sioread,
- /* write */ siowrite,
- /* ioctl */ sioioctl,
- /* poll */ ttypoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ sio_driver_name,
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ D_TTY | D_KQFILTER,
- /* kqfilter */ ttykqfilter,
+ .d_open = sioopen,
+ .d_close = sioclose,
+ .d_read = sioread,
+ .d_write = siowrite,
+ .d_ioctl = sioioctl,
+ .d_poll = ttypoll,
+ .d_name = sio_driver_name,
+ .d_maj = CDEV_MAJOR,
+ .d_flags = D_TTY | D_KQFILTER,
+ .d_kqfilter = ttykqfilter,
};
int comconsole = -1;
diff --git a/sys/pc98/pc98/fd.c b/sys/pc98/pc98/fd.c
index 98b9622..05d6ab9 100644
--- a/sys/pc98/pc98/fd.c
+++ b/sys/pc98/pc98/fd.c
@@ -620,19 +620,15 @@ fdin_rd(fdc_p fdc)
#define CDEV_MAJOR 9
static struct cdevsw fd_cdevsw = {
- /* open */ Fdopen,
- /* close */ fdclose,
- /* read */ physread,
- /* write */ physwrite,
- /* ioctl */ fdioctl,
- /* poll */ nopoll,
- /* mmap */ nommap,
- /* strategy */ fdstrategy,
- /* name */ "fd",
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ D_DISK,
+ .d_open = Fdopen,
+ .d_close = fdclose,
+ .d_read = physread,
+ .d_write = physwrite,
+ .d_ioctl = fdioctl,
+ .d_strategy = fdstrategy,
+ .d_name = "fd",
+ .d_maj = CDEV_MAJOR,
+ .d_flags = D_DISK,
};
/*
diff --git a/sys/pc98/pc98/mse.c b/sys/pc98/pc98/mse.c
index 25035f5..406d8f3 100644
--- a/sys/pc98/pc98/mse.c
+++ b/sys/pc98/pc98/mse.c
@@ -138,19 +138,13 @@ static d_poll_t msepoll;
#define CDEV_MAJOR 27
static struct cdevsw mse_cdevsw = {
- /* open */ mseopen,
- /* close */ mseclose,
- /* read */ mseread,
- /* write */ nowrite,
- /* ioctl */ mseioctl,
- /* poll */ msepoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "mse",
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = mseopen,
+ .d_close = mseclose,
+ .d_read = mseread,
+ .d_ioctl = mseioctl,
+ .d_poll = msepoll,
+ .d_name = "mse",
+ .d_maj = CDEV_MAJOR,
};
static void mseintr(void *);
diff --git a/sys/pc98/pc98/olpt.c b/sys/pc98/pc98/olpt.c
index 6e41a42..e54b143 100644
--- a/sys/pc98/pc98/olpt.c
+++ b/sys/pc98/pc98/olpt.c
@@ -232,19 +232,12 @@ static d_ioctl_t lptioctl;
#define CDEV_MAJOR 16
static struct cdevsw lpt_cdevsw = {
- /* open */ lptopen,
- /* close */ lptclose,
- /* read */ noread,
- /* write */ lptwrite,
- /* ioctl */ lptioctl,
- /* poll */ nopoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "lpt",
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = lptopen,
+ .d_close = lptclose,
+ .d_write = lptwrite,
+ .d_ioctl = lptioctl,
+ .d_name = "lpt",
+ .d_maj = CDEV_MAJOR,
};
static bus_addr_t lpt_iat[] = {0, 2, 4, 6};
diff --git a/sys/pc98/pc98/pc98gdc.c b/sys/pc98/pc98/pc98gdc.c
index 6525c5b..01a63ad 100644
--- a/sys/pc98/pc98/pc98gdc.c
+++ b/sys/pc98/pc98/pc98gdc.c
@@ -102,19 +102,14 @@ static d_ioctl_t gdcioctl;
static d_mmap_t gdcmmap;
static struct cdevsw gdc_cdevsw = {
- /* open */ gdcopen,
- /* close */ gdcclose,
- /* read */ gdcread,
- /* write */ gdcwrite,
- /* ioctl */ gdcioctl,
- /* poll */ nopoll,
- /* mmap */ gdcmmap,
- /* strategy */ nostrategy,
- /* name */ DRIVER_NAME,
- /* maj */ -1,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = gdcopen,
+ .d_close = gdcclose,
+ .d_read = gdcread,
+ .d_write = gdcwrite,
+ .d_ioctl = gdcioctl,
+ .d_mmap = gdcmmap,
+ .d_name = DRIVER_NAME,
+ .d_maj = -1,
};
#endif /* FB_INSTALL_CDEV */
diff --git a/sys/pc98/pc98/pcaudio.c b/sys/pc98/pc98/pcaudio.c
index 38f81a2..8bab0f3 100644
--- a/sys/pc98/pc98/pcaudio.c
+++ b/sys/pc98/pc98/pcaudio.c
@@ -159,19 +159,13 @@ static d_poll_t pcapoll;
#define CDEV_MAJOR 24
static struct cdevsw pca_cdevsw = {
- /* open */ pcaopen,
- /* close */ pcaclose,
- /* read */ noread,
- /* write */ pcawrite,
- /* ioctl */ pcaioctl,
- /* poll */ pcapoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "pca",
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = pcaopen,
+ .d_close = pcaclose,
+ .d_write = pcawrite,
+ .d_ioctl = pcaioctl,
+ .d_poll = pcapoll,
+ .d_name = "pca",
+ .d_maj = CDEV_MAJOR,
};
static void pca_continue(void);
diff --git a/sys/pc98/pc98/sio.c b/sys/pc98/pc98/sio.c
index 18f1483..3ec2bee 100644
--- a/sys/pc98/pc98/sio.c
+++ b/sys/pc98/pc98/sio.c
@@ -407,20 +407,16 @@ static d_ioctl_t sioioctl;
#define CDEV_MAJOR 28
static struct cdevsw sio_cdevsw = {
- /* open */ sioopen,
- /* close */ sioclose,
- /* read */ sioread,
- /* write */ siowrite,
- /* ioctl */ sioioctl,
- /* poll */ ttypoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ sio_driver_name,
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ D_TTY | D_KQFILTER,
- /* kqfilter */ ttykqfilter,
+ .d_open = sioopen,
+ .d_close = sioclose,
+ .d_read = sioread,
+ .d_write = siowrite,
+ .d_ioctl = sioioctl,
+ .d_poll = ttypoll,
+ .d_name = sio_driver_name,
+ .d_maj = CDEV_MAJOR,
+ .d_flags = D_TTY | D_KQFILTER,
+ .d_kqfilter = ttykqfilter,
};
int comconsole = -1;
diff --git a/sys/pc98/pc98/spkr.c b/sys/pc98/pc98/spkr.c
index a1fe003..208d2bb 100644
--- a/sys/pc98/pc98/spkr.c
+++ b/sys/pc98/pc98/spkr.c
@@ -38,19 +38,12 @@ static d_ioctl_t spkrioctl;
#define CDEV_MAJOR 26
static struct cdevsw spkr_cdevsw = {
- /* open */ spkropen,
- /* close */ spkrclose,
- /* read */ noread,
- /* write */ spkrwrite,
- /* ioctl */ spkrioctl,
- /* poll */ nopoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "spkr",
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = spkropen,
+ .d_close = spkrclose,
+ .d_write = spkrwrite,
+ .d_ioctl = spkrioctl,
+ .d_name = "spkr",
+ .d_maj = CDEV_MAJOR,
};
static MALLOC_DEFINE(M_SPKR, "spkr", "Speaker buffer");
diff --git a/sys/pc98/pc98/syscons.c b/sys/pc98/pc98/syscons.c
index 3d015f1..7220f70 100644
--- a/sys/pc98/pc98/syscons.c
+++ b/sys/pc98/pc98/syscons.c
@@ -212,20 +212,17 @@ static d_ioctl_t scioctl;
static d_mmap_t scmmap;
static struct cdevsw sc_cdevsw = {
- /* open */ scopen,
- /* close */ scclose,
- /* read */ scread,
- /* write */ ttywrite,
- /* ioctl */ scioctl,
- /* poll */ ttypoll,
- /* mmap */ scmmap,
- /* strategy */ nostrategy,
- /* name */ "sc",
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ D_TTY | D_KQFILTER,
- /* kqfilter */ ttykqfilter
+ .d_open = scopen,
+ .d_close = scclose,
+ .d_read = scread,
+ .d_write = ttywrite,
+ .d_ioctl = scioctl,
+ .d_poll = ttypoll,
+ .d_mmap = scmmap,
+ .d_name = "sc",
+ .d_maj = CDEV_MAJOR,
+ .d_flags = D_TTY | D_KQFILTER,
+ .d_kqfilter = ttykqfilter
};
int
diff --git a/sys/pc98/pc98/wd_cd.c b/sys/pc98/pc98/wd_cd.c
index a9c07fe..c784acd 100644
--- a/sys/pc98/pc98/wd_cd.c
+++ b/sys/pc98/pc98/wd_cd.c
@@ -51,19 +51,15 @@ static d_strategy_t acdstrategy;
#define CDEV_MAJOR 69
static struct cdevsw acd_cdevsw = {
- /* open */ acdopen,
- /* close */ acdclose,
- /* read */ physread,
- /* write */ physwrite,
- /* ioctl */ acdioctl,
- /* poll */ nopoll,
- /* mmap */ nommap,
- /* strategy */ acdstrategy,
- /* name */ "wcd",
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ D_DISK,
+ .d_open = acdopen,
+ .d_close = acdclose,
+ .d_read = physread,
+ .d_write = physwrite,
+ .d_ioctl = acdioctl,
+ .d_strategy = acdstrategy,
+ .d_name = "wcd",
+ .d_maj = CDEV_MAJOR,
+ .d_flags = D_DISK,
};
#define NUNIT 16 /* Max # of devices */
diff --git a/sys/pccard/pccard.c b/sys/pccard/pccard.c
index 8c6397c..3d3ad26 100644
--- a/sys/pccard/pccard.c
+++ b/sys/pccard/pccard.c
@@ -84,19 +84,14 @@ static d_poll_t crdpoll;
#define CDEV_MAJOR MAJOR_AUTO
#endif
static struct cdevsw crd_cdevsw = {
- /* open */ crdopen,
- /* close */ crdclose,
- /* read */ crdread,
- /* write */ crdwrite,
- /* ioctl */ crdioctl,
- /* poll */ crdpoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "crd",
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = crdopen,
+ .d_close = crdclose,
+ .d_read = crdread,
+ .d_write = crdwrite,
+ .d_ioctl = crdioctl,
+ .d_poll = crdpoll,
+ .d_name = "crd",
+ .d_maj = CDEV_MAJOR,
};
/*
diff --git a/sys/pci/agp.c b/sys/pci/agp.c
index be2f7f8..8c59946 100644
--- a/sys/pci/agp.c
+++ b/sys/pci/agp.c
@@ -70,19 +70,13 @@ static d_ioctl_t agp_ioctl;
static d_mmap_t agp_mmap;
static struct cdevsw agp_cdevsw = {
- /* open */ agp_open,
- /* close */ agp_close,
- /* read */ noread,
- /* write */ nowrite,
- /* ioctl */ agp_ioctl,
- /* poll */ nopoll,
- /* mmap */ agp_mmap,
- /* strategy */ nostrategy,
- /* name */ "agp",
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ D_TTY,
+ .d_open = agp_open,
+ .d_close = agp_close,
+ .d_ioctl = agp_ioctl,
+ .d_mmap = agp_mmap,
+ .d_name = "agp",
+ .d_maj = CDEV_MAJOR,
+ .d_flags = D_TTY,
};
static devclass_t agp_devclass;
diff --git a/sys/pci/if_ti.c b/sys/pci/if_ti.c
index e0ac1d1..be81f61 100644
--- a/sys/pci/if_ti.c
+++ b/sys/pci/if_ti.c
@@ -192,19 +192,11 @@ static d_close_t ti_close;
static d_ioctl_t ti_ioctl2;
static struct cdevsw ti_cdevsw = {
- /* open */ ti_open,
- /* close */ ti_close,
- /* read */ noread,
- /* write */ nowrite,
- /* ioctl */ ti_ioctl2,
- /* poll */ seltrue,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "ti",
- /* maj */ TI_CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = ti_open,
+ .d_close = ti_close,
+ .d_ioctl = ti_ioctl2,
+ .d_name = "ti",
+ .d_maj = TI_CDEV_MAJOR,
};
static int ti_probe (device_t);
diff --git a/sys/pci/meteor.c b/sys/pci/meteor.c
index 09bfbae..96bc7d5 100644
--- a/sys/pci/meteor.c
+++ b/sys/pci/meteor.c
@@ -228,19 +228,14 @@ static d_mmap_t meteor_mmap;
#define CDEV_MAJOR 67
static struct cdevsw meteor_cdevsw = {
- /* open */ meteor_open,
- /* close */ meteor_close,
- /* read */ meteor_read,
- /* write */ meteor_write,
- /* ioctl */ meteor_ioctl,
- /* poll */ nopoll,
- /* mmap */ meteor_mmap,
- /* strategy */ nostrategy,
- /* name */ "meteor",
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = meteor_open,
+ .d_close = meteor_close,
+ .d_read = meteor_read,
+ .d_write = meteor_write,
+ .d_ioctl = meteor_ioctl,
+ .d_mmap = meteor_mmap,
+ .d_name = "meteor",
+ .d_maj = CDEV_MAJOR,
};
#endif
diff --git a/sys/pci/xrpu.c b/sys/pci/xrpu.c
index 379a749..0c269d4 100644
--- a/sys/pci/xrpu.c
+++ b/sys/pci/xrpu.c
@@ -44,19 +44,12 @@ static d_mmap_t xrpu_mmap;
#define CDEV_MAJOR 100
static struct cdevsw xrpu_cdevsw = {
- /* open */ xrpu_open,
- /* close */ xrpu_close,
- /* read */ noread,
- /* write */ nowrite,
- /* ioctl */ xrpu_ioctl,
- /* poll */ nopoll,
- /* mmap */ xrpu_mmap,
- /* strategy */ nostrategy,
- /* name */ "xrpu",
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
+ .d_open = xrpu_open,
+ .d_close = xrpu_close,
+ .d_ioctl = xrpu_ioctl,
+ .d_mmap = xrpu_mmap,
+ .d_name = "xrpu",
+ .d_maj = CDEV_MAJOR,
};
static MALLOC_DEFINE(M_XRPU, "xrpu", "XRPU related");
diff --git a/sys/sparc64/sparc64/mem.c b/sys/sparc64/sparc64/mem.c
index cb20e6a..6d9bda3 100644
--- a/sys/sparc64/sparc64/mem.c
+++ b/sys/sparc64/sparc64/mem.c
@@ -79,19 +79,13 @@ static d_read_t mmrw;
#define CDEV_MAJOR 2
static struct cdevsw mem_cdevsw = {
- /* open */ mmopen,
- /* close */ mmclose,
- /* read */ mmrw,
- /* write */ mmrw,
- /* ioctl */ noioctl,
- /* poll */ (d_poll_t *)seltrue,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "mem",
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ D_MEM,
+ .d_open = mmopen,
+ .d_close = mmclose,
+ .d_read = mmrw,
+ .d_write = mmrw,
+ .d_name = "mem",
+ .d_maj = CDEV_MAJOR,
+ .d_flags = D_MEM,
};
static int
OpenPOWER on IntegriCloud