summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2003-03-03 12:15:54 +0000
committerphk <phk@FreeBSD.org>2003-03-03 12:15:54 +0000
commit0ae911eb0e57eebb61c50c02ddf69aa67ed19599 (patch)
tree4e91d5779ffebe1d75e975aa4450f35f965430eb /sys/dev
parente58d97a666e757e8429a219da05f88a51554c32c (diff)
downloadFreeBSD-src-0ae911eb0e57eebb61c50c02ddf69aa67ed19599.zip
FreeBSD-src-0ae911eb0e57eebb61c50c02ddf69aa67ed19599.tar.gz
Gigacommit to improve device-driver source compatibility between
branches: Initialize struct cdevsw using C99 sparse initializtion and remove all initializations to default values. This patch is automatically generated and has been tested by compiling LINT with all the fields in struct cdevsw in reverse order on alpha, sparc64 and i386. Approved by: re(scottl)
Diffstat (limited to 'sys/dev')
-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
74 files changed, 541 insertions, 991 deletions
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;
OpenPOWER on IntegriCloud