Use canonical format for cdevsw initialization.
This commit is contained in:
parent
bbaba62872
commit
95e4359c8e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=111753
@ -143,20 +143,20 @@ const struct digi_control_signals digi_normal_signals = {
|
||||
};
|
||||
|
||||
static struct cdevsw digi_sw = {
|
||||
digiopen, /* open */
|
||||
digiclose, /* close */
|
||||
digiread, /* read */
|
||||
digiwrite, /* write */
|
||||
digiioctl, /* ioctl */
|
||||
ttypoll, /* poll */
|
||||
nommap, /* mmap */
|
||||
nostrategy, /* strategy */
|
||||
driver_name, /* name */
|
||||
CDEV_MAJOR, /* maj */
|
||||
nodump, /* dump */
|
||||
nopsize, /* psize */
|
||||
D_TTY | D_KQFILTER, /* flags */
|
||||
ttykqfilter /* bmaj */
|
||||
/* 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
|
||||
};
|
||||
|
||||
static void
|
||||
|
@ -67,8 +67,19 @@ static d_mmap_t fw_mmap;
|
||||
|
||||
struct cdevsw firewire_cdevsw =
|
||||
{
|
||||
fw_open, fw_close, fw_read, fw_write, fw_ioctl,
|
||||
fw_poll, fw_mmap, nostrategy, "fw", CDEV_MAJOR, nodump, nopsize, D_MEM
|
||||
/* 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
|
||||
};
|
||||
|
||||
static int
|
||||
|
@ -215,19 +215,19 @@ d_close_t raidctlclose;
|
||||
d_ioctl_t raidctlioctl;
|
||||
|
||||
static struct cdevsw raidctl_cdevsw = {
|
||||
raidctlopen,
|
||||
raidctlclose,
|
||||
noread,
|
||||
nowrite,
|
||||
raidctlioctl,
|
||||
nopoll,
|
||||
nommap,
|
||||
nostrategy,
|
||||
"raidctl",
|
||||
201,
|
||||
nodump,
|
||||
nopsize,
|
||||
0,
|
||||
/* 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,
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -71,19 +71,19 @@ static d_ioctl_t twe_ioctl_wrapper;
|
||||
#define TWE_CDEV_MAJOR 146
|
||||
|
||||
static struct cdevsw twe_cdevsw = {
|
||||
twe_open,
|
||||
twe_close,
|
||||
noread,
|
||||
nowrite,
|
||||
twe_ioctl_wrapper,
|
||||
nopoll,
|
||||
nommap,
|
||||
nostrategy,
|
||||
"twe",
|
||||
TWE_CDEV_MAJOR,
|
||||
nodump,
|
||||
nopsize,
|
||||
0
|
||||
/* 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
|
||||
};
|
||||
|
||||
/********************************************************************************
|
||||
|
@ -90,10 +90,19 @@ d_ioctl_t ufmioctl;
|
||||
#define UFM_CDEV_MAJOR MAJOR_AUTO
|
||||
|
||||
Static struct cdevsw ufm_cdevsw = {
|
||||
ufmopen, ufmclose, noread, nowrite,
|
||||
ufmioctl, nopoll, nommap, nostrategy,
|
||||
"ufm", UFM_CDEV_MAJOR, nodump, nopsize,
|
||||
0,
|
||||
/* 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,
|
||||
#if (__FreeBSD_version < 500014)
|
||||
-1
|
||||
#endif
|
||||
|
@ -116,10 +116,19 @@ d_ioctl_t urioioctl;
|
||||
#define URIO_CDEV_MAJOR 143
|
||||
|
||||
Static struct cdevsw urio_cdevsw = {
|
||||
urioopen, urioclose, urioread, uriowrite,
|
||||
urioioctl, nopoll, nommap, nostrategy,
|
||||
"urio", URIO_CDEV_MAJOR,nodump, nopsize,
|
||||
0,
|
||||
/* 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,
|
||||
#if __FreeBSD_version < 500014
|
||||
-1
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user