diff options
author | Poul-Henning Kamp <phk@FreeBSD.org> | 2004-02-21 19:42:58 +0000 |
---|---|---|
committer | Poul-Henning Kamp <phk@FreeBSD.org> | 2004-02-21 19:42:58 +0000 |
commit | c9c7976f7ffdd0ed81e12d8930651a9a858defa1 (patch) | |
tree | c4705f5f800de96d25d8356b2711c664dabcd41e /sys | |
parent | 7563a29b8566c3c862a995022e62a54b6c3faa6b (diff) |
Device megapatch 1/6:
Free approx 86 major numbers with a mostly automatically generated patch.
A number of strategic drivers have been left behind by caution, and a few
because they still (ab)use their major number.
Notes
Notes:
svn path=/head/; revision=126076
Diffstat (limited to 'sys')
103 files changed, 4 insertions, 291 deletions
diff --git a/sys/alpha/alpha/promcons.c b/sys/alpha/alpha/promcons.c index 68bf6bfc252c..1800de6e624c 100644 --- a/sys/alpha/alpha/promcons.c +++ b/sys/alpha/alpha/promcons.c @@ -63,7 +63,6 @@ static d_open_t promopen; static d_close_t promclose; static d_ioctl_t promioctl; -#define CDEV_MAJOR 97 static struct cdevsw prom_cdevsw = { .d_open = promopen, .d_close = promclose, @@ -72,7 +71,6 @@ static struct cdevsw prom_cdevsw = { .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 0852724f0d3e..55065e1f786f 100644 --- a/sys/alpha/tlsb/zs_tlsb.c +++ b/sys/alpha/tlsb/zs_tlsb.c @@ -70,7 +70,6 @@ static d_open_t zsopen; static d_close_t zsclose; static d_ioctl_t zsioctl; -#define CDEV_MAJOR 135 static struct cdevsw zs_cdevsw = { .d_open = zsopen, .d_close = zsclose, @@ -79,7 +78,6 @@ static struct cdevsw zs_cdevsw = { .d_ioctl = zsioctl, .d_poll = ttypoll, .d_name = "zs", - .d_maj = CDEV_MAJOR, }; static void zsstart(struct tty *); diff --git a/sys/cam/cam_xpt.c b/sys/cam/cam_xpt.c index 3b9961368d63..03eaf544439e 100644 --- a/sys/cam/cam_xpt.c +++ b/sys/cam/cam_xpt.c @@ -630,7 +630,6 @@ static struct periph_driver probe_driver = PERIPHDRIVER_DECLARE(xpt, xpt_driver); PERIPHDRIVER_DECLARE(probe, probe_driver); -#define XPT_CDEV_MAJOR 104 static d_open_t xptopen; static d_close_t xptclose; @@ -641,7 +640,6 @@ static struct cdevsw xpt_cdevsw = { .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_ch.c b/sys/cam/scsi/scsi_ch.c index 1ece680c54eb..a9ed37376c23 100644 --- a/sys/cam/scsi/scsi_ch.c +++ b/sys/cam/scsi/scsi_ch.c @@ -174,7 +174,6 @@ struct ch_softc { }; #define CHUNIT(x) (minor((x))) -#define CH_CDEV_MAJOR 17 static d_open_t chopen; static d_close_t chclose; @@ -217,7 +216,6 @@ static struct cdevsw ch_cdevsw = { .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 6aa75684393c..13c1017e5ca1 100644 --- a/sys/cam/scsi/scsi_pass.c +++ b/sys/cam/scsi/scsi_pass.c @@ -77,7 +77,6 @@ struct pass_softc { dev_t dev; }; -#define PASS_CDEV_MAJOR 31 static d_open_t passopen; static d_close_t passclose; @@ -110,7 +109,6 @@ static struct cdevsw pass_cdevsw = { .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 72e529013c2e..cc3afa6ce58c 100644 --- a/sys/cam/scsi/scsi_pt.c +++ b/sys/cam/scsi/scsi_pt.c @@ -116,7 +116,6 @@ static struct periph_driver ptdriver = PERIPHDRIVER_DECLARE(pt, ptdriver); -#define PT_CDEV_MAJOR 61 static struct cdevsw pt_cdevsw = { .d_open = ptopen, @@ -126,7 +125,6 @@ static struct cdevsw pt_cdevsw = { .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 adb22f846ccf..c41e4166ef91 100644 --- a/sys/cam/scsi/scsi_sa.c +++ b/sys/cam/scsi/scsi_sa.c @@ -423,7 +423,6 @@ PERIPHDRIVER_DECLARE(sa, sadriver); #define D_TAPE 0 #endif -#define SA_CDEV_MAJOR 14 static struct cdevsw sa_cdevsw = { .d_open = saopen, @@ -433,7 +432,6 @@ static struct cdevsw sa_cdevsw = { .d_ioctl = saioctl, .d_strategy = sastrategy, .d_name = "sa", - .d_maj = SA_CDEV_MAJOR, .d_flags = D_TAPE, }; diff --git a/sys/cam/scsi/scsi_ses.c b/sys/cam/scsi/scsi_ses.c index 738178714f35..8f594ae2bcd5 100644 --- a/sys/cam/scsi/scsi_ses.c +++ b/sys/cam/scsi/scsi_ses.c @@ -153,7 +153,6 @@ struct ses_softc { #define SES_FLAG_INITIALIZED 0x04 #define SESUNIT(x) (minor((x))) -#define SES_CDEV_MAJOR 110 static d_open_t sesopen; static d_close_t sesclose; @@ -175,13 +174,11 @@ static struct periph_driver sesdriver = { PERIPHDRIVER_DECLARE(ses, sesdriver); -static struct cdevsw ses_cdevsw = -{ +static struct cdevsw ses_cdevsw = { .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 749447fb9fd0..7e0d28fbd83b 100644 --- a/sys/cam/scsi/scsi_target.c +++ b/sys/cam/scsi/scsi_target.c @@ -104,7 +104,6 @@ static int targreadfilt(struct knote *kn, long hint); static struct filterops targread_filtops = { 1, NULL, targreadfiltdetach, targreadfilt }; -#define TARG_CDEV_MAJOR 65 static struct cdevsw targ_cdevsw = { .d_open = targopen, .d_close = targclose, @@ -113,7 +112,6 @@ static struct cdevsw targ_cdevsw = { .d_ioctl = targioctl, .d_poll = targpoll, .d_name = "targ", - .d_maj = TARG_CDEV_MAJOR, .d_kqfilter = targkqfilter }; diff --git a/sys/conf/majors b/sys/conf/majors index 60c0727a4379..62f5264e8a36 100644 --- a/sys/conf/majors +++ b/sys/conf/majors @@ -23,25 +23,10 @@ 5 *pts pseudo tty "tty" half 6 *ptc pseudo tty "master" half 7 *log system log -9 *fd floppy disk -10 *wt i386/isa/wt.c -11 *spigot Video capture? -12 *sc syscons/pcvt virtual consoles -14 *sa SCSI "sequential access devices" -16 *lpt PC parallel printer port -17 *ch SCSI changer 18 *nmdm nullmodem back-to-back tty ports 19 *tw X-10 power interface -20 *ng_device Netgraph -21 *psm PS/2 Mouse 22 *fd (/dev/stdin etc) -23 *bpf Berkeley Packet Filter -26 *spkr PC speaker (/dev/spkr) -27 *mse Microsoft bus-mouse -28 *sio 16450/16550 serial -29 *mcd Mitsumi CDROM interface <mdodd> 30 *snd sound driver system -31 *pass SCSI "Application Pass-Thru" 32 lkmc Loadable Kernel Module Controller 33 lkm assigned to Loadable Kernel Modules 34 lkm assigned to Loadable Kernel Modules @@ -49,110 +34,55 @@ 36 lkm assigned to Loadable Kernel Modules 37 lkm assigned to Loadable Kernel Modules 38 lkm assigned to Loadable Kernel Modules -39 *apm Advanced Power Management also ACPI -40 *ctx Cortex 42 *cx Cronyx/Sigma serial adapter 43 vn vnode "disk" device (retired) -44 *gp GPIB -45 *scd Sony CDROM interface <mdodd> 46 - - -47 *gsc Genius Scanner -48 *cy Cyclades -51 *joy joystick 52 *tun IP tunnel device -53 *snp tty snoop 54 OLDnic ISDN system -55 *i4b_ctl ISDN4BSD -56 *i4b_tel ISDN4BSD -57 *i4b_rbch ISDN4BSD 58 - Was dgb: Digiboard PC/Xe -59 *i4b_trace ISDN4BSD -60 *i4b_i4bdrv ISDN4BSD -61 *pt SCSI "processor target" 62 worm SCSI "worm type" -63 *rc Riscom/8 driver 64 ?? Talisman -65 *targ SCSI target sample driver 66 labpc National Instruments LabPC 67 - was meteor Matrox Meteor video capture -68 *si Specialix SI/XIO (peter@freebsd.org) -69 *wcd ATAPI CDROM client of "wd" 70 crypto Device-independent crypto interface (from openbsd) -71 *asc AmiScan driver -72 *stl Stallion (cd1400 based) (gerg@stallion.oz.au) 74 *ccd concatenated disk -75 *stli Stallion (intelligent cdk based) (gerg@stallion.oz.au) 76 scc IBM Smart Capture Card (ohashi@mickey.ai.kyutech.ac.jp) 77 cyy Cyclades Ye/PCI serial card 78 pci PCI bus 79 *ipl IP Filter 80 xdcp Assigned to Chris Ficklin <chris@serengeti.com> -81 *rp RocketPort/Steve Gericke <steveg@comtrol.com> -82 *ppi Generic Parallel I/O <Nicolas.Souchu@prism.uvsq.fr> 83 can CAN16-2 CAN-PC Interface 84 dtfp Datum Time and Frequency processor (louie@UU.NET) 85 vesa VESA support device (j_mini@efn.org) 86 alog Industrial Computer Source AIO8-P driver (deprecated) 87 wfd ATAPI floppy client of "wd" -88 *dpt DPT RAID Controller <shimon@i-connect.net> -89 *pps Pulse-Per-Second timing interface 90 wst ATAPI tape client of "wd" 91 *vinum Volume manager 92 *bktr Bt848 video capture driver (hasty@star-gate.com) 93 *coda CODA filesystem. 96 altq alternate queueing (including cbq, red, wfq) -97 *prom Alpha PROM console 98 loe Loopback pseudo-ethernet (sbabkin@dcn.att.com) 99 ct Cronyx/Tau serial adaptor -103 *streams SVR4 Streams emulation <newton@atdot.dotat.org> -104 *xpt CAM Transport Layer Services -105 *iic I2C bus generic i/o -106 *smb System Management Bus generic i/o -107 *3dfx 3Dfx driver <cokane> -108 *usb Universal Serial Bus <n_hibma> -110 *ses SCSI Environmental Services driver (mjacob@feral.com) -111 *ums USB Mouse <n_hibma> -112 *kbd keyboard -113 *ulpt USB Printer <n_hibma> -114 *ugen USB Generic device <n_hibma> 115 dag University of Waikato DAG network capture boards 117 *acd ATAPI CDROM 119 *ast ATAPI tape 121 onew Dallas Semiconductor One-Wire bus <phk@freebsd.org> -122 *uhid USB HID devices <n_hibma> -123 *fb frame buffer 124 ucdc USB Communication Class Driver <n_hibma> 125 digio Advantech PCI-1750 IO card jen@vulture.dmem.strath.ac.uk 126 sync Generic sync port support <phk>, <brian> -127 *fire Firewire driver <ikob@koganei.wide.ad.jp> 128 arla Arla (AFS-clone) driver -130 *mlx Mylex DAC960 RAID (control device) 134 taupci Cronyx Tau-PCI card <vak@hanoi.cronyx.ru> -135 *zsc TurboLaser console uart 136 ipr Iprobe on-chip perf. counters (gallatin@freebsd.org) 137 nfp nFast PCI crypto accelerator (support@ncipher.com) -138 *ucom USB Serial support <n_hibma> 139 wanrouter Sangoma Technologies Inc. (al.feldman@sangoma.com) -140 *pcfclock PCFCLOCK <sascha@schumann.cx> 141 pcdmx PCDMX theatre lighting controller 142 skip SKIP port (security/skip) control device -143 *urio USB Rio 500 <n_hibma> -145 *dri DRI Graphics for OpenGL <dfr> -146 *twe 3ware Escalade ATA RAID (controller) -148 *agp AGP <dfr> 149 *tap Ethernet tunneling device <myevmenkin@att.com> -152 *acpi ACPI bios support (Takanori Watanabe takawata@shidahara1.planet.sci.kobe-u.ac.jp) -153 *ti Tigon Gigabit Ethernet driver (ken@FreeBSD.ORG) 154 *asr Adaptec SCSI RAID <msmith@freebsd.org> 155 phone Quicknet PhoneJACK and LineJACK cards for VoIP <roger> -156 *uscanner USB Scanners <n_hibma> -158 *mly Mylex RAID control device 159 *ata ATA control device -160 *spic Sony Programmable I/O Controller (jogdial) 161 swdoc Sitara networks watchdog device -162 *digi Digiboard 163 - - -166 *ciss Compaq SmartArray 5* adapter <msmith> 168 XXX used by pst in RELENG_4 170 pst Promise SuperTrak (uses 168 in RELENG_4) 171 mide LSI MegaRAID IDE (control device) @@ -162,12 +92,9 @@ 180 nvidia NVIDIA (nvidiaN/nvidiactl) <mdodd> 181 casm HP/Compaq ProLiant Advanced Server Management <peter> 183 *smapi SMAPI BIOS interface <mdodd> -184 dcons Dumb console driver <simokawa> 185 ce Cronyx Tau-32 E1 adapter <rik@cronyx.ru> 186 sx Specialix I/O8+ driver <frank@exit.com> 187 twa 3ware Apache ATA RAID (controller) -200 ?? entries from 200-252 are reserved for local use -248 *isp dev/isp/isp_freebsd.c 252 ?? entries from 200-252 are reserved for local use 254 internal Used internally by the kernel 255 bad_choice -1 is 255 which has magic meanings internally diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c index a92659a34674..3c7b038e9a85 100644 --- a/sys/dev/acpica/acpi.c +++ b/sys/dev/acpica/acpi.c @@ -66,13 +66,11 @@ static d_open_t acpiopen; static d_close_t acpiclose; static d_ioctl_t acpiioctl; -#define CDEV_MAJOR 152 static struct cdevsw acpi_cdevsw = { .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 2ae2b72e20ad..6f09660fad6a 100644 --- a/sys/dev/agp/agp.c +++ b/sys/dev/agp/agp.c @@ -63,7 +63,6 @@ MODULE_VERSION(agp, 1); MALLOC_DEFINE(M_AGP, "agp", "AGP data structures"); -#define CDEV_MAJOR 148 /* agp_drv.c */ static d_open_t agp_open; static d_close_t agp_close; @@ -76,7 +75,6 @@ static struct cdevsw agp_cdevsw = { .d_ioctl = agp_ioctl, .d_mmap = agp_mmap, .d_name = "agp", - .d_maj = CDEV_MAJOR, }; static devclass_t agp_devclass; diff --git a/sys/dev/atkbdc/psm.c b/sys/dev/atkbdc/psm.c index 4b1277632024..e886e8cc9e4b 100644 --- a/sys/dev/atkbdc/psm.c +++ b/sys/dev/atkbdc/psm.c @@ -346,7 +346,6 @@ static driver_t psm_driver = { sizeof(struct psm_softc), }; -#define CDEV_MAJOR 21 static struct cdevsw psm_cdevsw = { .d_open = psmopen, @@ -355,7 +354,6 @@ static struct cdevsw psm_cdevsw = { .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 b074962f472d..92c7fbea8d74 100644 --- a/sys/dev/bktr/bktr_os.c +++ b/sys/dev/bktr/bktr_os.c @@ -257,7 +257,6 @@ static d_ioctl_t bktr_ioctl; static d_mmap_t bktr_mmap; static d_poll_t bktr_poll; -#define CDEV_MAJOR 92 static struct cdevsw bktr_cdevsw = { .d_open = bktr_open, .d_close = bktr_close, @@ -267,7 +266,6 @@ static struct cdevsw bktr_cdevsw = { .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/ciss/ciss.c b/sys/dev/ciss/ciss.c index e3deb352b487..843577de431d 100644 --- a/sys/dev/ciss/ciss.c +++ b/sys/dev/ciss/ciss.c @@ -212,14 +212,12 @@ static d_open_t ciss_open; static d_close_t ciss_close; static d_ioctl_t ciss_ioctl; -#define CISS_CDEV_MAJOR 166 static struct cdevsw ciss_cdevsw = { .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 203ed94c60e5..4351a3051de8 100644 --- a/sys/dev/cy/cy.c +++ b/sys/dev/cy/cy.c @@ -385,7 +385,6 @@ static d_close_t sioclose; static d_write_t siowrite; static d_ioctl_t sioioctl; -#define CDEV_MAJOR 48 static struct cdevsw sio_cdevsw = { .d_open = sioopen, .d_close = sioclose, @@ -394,7 +393,6 @@ static struct cdevsw sio_cdevsw = { .d_ioctl = sioioctl, .d_poll = ttypoll, .d_name = driver_name, - .d_maj = CDEV_MAJOR, .d_flags = D_TTY, .d_kqfilter = ttykqfilter, }; diff --git a/sys/dev/cy/cy_isa.c b/sys/dev/cy/cy_isa.c index 203ed94c60e5..4351a3051de8 100644 --- a/sys/dev/cy/cy_isa.c +++ b/sys/dev/cy/cy_isa.c @@ -385,7 +385,6 @@ static d_close_t sioclose; static d_write_t siowrite; static d_ioctl_t sioioctl; -#define CDEV_MAJOR 48 static struct cdevsw sio_cdevsw = { .d_open = sioopen, .d_close = sioclose, @@ -394,7 +393,6 @@ static struct cdevsw sio_cdevsw = { .d_ioctl = sioioctl, .d_poll = ttypoll, .d_name = driver_name, - .d_maj = CDEV_MAJOR, .d_flags = D_TTY, .d_kqfilter = ttykqfilter, }; diff --git a/sys/dev/dcons/dcons.c b/sys/dev/dcons/dcons.c index 6fd284486e37..04d75494f1c6 100644 --- a/sys/dev/dcons/dcons.c +++ b/sys/dev/dcons/dcons.c @@ -81,7 +81,6 @@ static struct consdev gdbconsdev; #endif -#define CDEV_MAJOR 184 static d_open_t dcons_open; static d_close_t dcons_close; @@ -96,7 +95,6 @@ static struct cdevsw dcons_cdevsw = { .d_ioctl = dcons_ioctl, .d_poll = ttypoll, .d_name = "dcons", - .d_maj = CDEV_MAJOR, #else /* open */ dcons_open, /* close */ dcons_close, diff --git a/sys/dev/digi/digi.c b/sys/dev/digi/digi.c index d36694727b48..f1bc67019e2a 100644 --- a/sys/dev/digi/digi.c +++ b/sys/dev/digi/digi.c @@ -58,7 +58,6 @@ #include <dev/digi/digi_mod.h> #include <dev/digi/digi_pci.h> -#define CDEV_MAJOR 162 #define CTRL_DEV 0x800000 #define CALLOUT_MASK 0x400000 @@ -150,7 +149,6 @@ static struct cdevsw digi_sw = { .d_ioctl = digiioctl, .d_poll = ttypoll, .d_name = driver_name, - .d_maj = CDEV_MAJOR, .d_flags = D_TTY, .d_kqfilter = ttykqfilter }; diff --git a/sys/dev/dpt/dpt.h b/sys/dev/dpt/dpt.h index 6b909a9dc416..d04c95a3b8bb 100644 --- a/sys/dev/dpt/dpt.h +++ b/sys/dev/dpt/dpt.h @@ -47,7 +47,6 @@ #include <sys/ioccom.h> -#define DPT_CDEV_MAJOR 88 #undef DPT_USE_DLM_SWI diff --git a/sys/dev/drm/drm_drv.h b/sys/dev/drm/drm_drv.h index b6b8c6111ff4..e0dfbccf5257 100644 --- a/sys/dev/drm/drm_drv.h +++ b/sys/dev/drm/drm_drv.h @@ -219,7 +219,6 @@ static struct cdevsw DRM(cdevsw) = { .d_poll = DRM( poll ), .d_mmap = DRM( mmap ), .d_name = DRIVER_NAME, - .d_maj = CDEV_MAJOR, .d_flags = D_TRACKCLOSE, #if __FreeBSD_version < 500000 .d_bmaj = -1 diff --git a/sys/dev/drm/drm_os_freebsd.h b/sys/dev/drm/drm_os_freebsd.h index 43b6524935de..43f630927cd3 100644 --- a/sys/dev/drm/drm_os_freebsd.h +++ b/sys/dev/drm/drm_os_freebsd.h @@ -114,7 +114,6 @@ #define DRM_DEV_MODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP) #define DRM_DEV_UID 0 #define DRM_DEV_GID 0 -#define CDEV_MAJOR 145 #if __FreeBSD_version >= 500000 #define DRM_CURPROC curthread diff --git a/sys/dev/fb/fb.c b/sys/dev/fb/fb.c index c47bd128a519..5ce670841029 100644 --- a/sys/dev/fb/fb.c +++ b/sys/dev/fb/fb.c @@ -361,7 +361,6 @@ static d_write_t fbwrite; static d_ioctl_t fbioctl; static d_mmap_t fbmmap; -#define CDEV_MAJOR 123 /* XXX */ static struct cdevsw fb_cdevsw = { .d_open = fbopen, @@ -371,7 +370,6 @@ static struct cdevsw fb_cdevsw = { .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 5cc94086bcb5..5a506334d5c4 100644 --- a/sys/dev/fdc/fdc.c +++ b/sys/dev/fdc/fdc.c @@ -481,7 +481,6 @@ fdin_rd(fdc_p fdc) return bus_space_read_1(fdc->portt, fdc->porth, FDIN); } -#define CDEV_MAJOR 9 static struct cdevsw fd_cdevsw = { .d_open = fdopen, .d_close = fdclose, @@ -490,7 +489,6 @@ static struct cdevsw fd_cdevsw = { .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 b3ecc8acccd5..9a34ff95fd3c 100644 --- a/sys/dev/firewire/fwdev.c +++ b/sys/dev/firewire/fwdev.c @@ -62,7 +62,6 @@ #include <dev/firewire/fwmem.h> #include <dev/firewire/iec68113.h> -#define CDEV_MAJOR 127 #define FWNODE_INVAL 0xffff static d_open_t fw_open; @@ -86,7 +85,6 @@ struct cdevsw firewire_cdevsw = .d_mmap = fw_mmap, .d_strategy = fw_strategy, .d_name = "fw", - .d_maj = CDEV_MAJOR, .d_flags = D_MEM #else fw_open, fw_close, fw_read, fw_write, fw_ioctl, diff --git a/sys/dev/iicbus/iic.c b/sys/dev/iicbus/iic.c index d6410c7e8824..0951f1f5847d 100644 --- a/sys/dev/iicbus/iic.c +++ b/sys/dev/iicbus/iic.c @@ -92,7 +92,6 @@ static d_write_t iicwrite; static d_read_t iicread; static d_ioctl_t iicioctl; -#define CDEV_MAJOR 105 static struct cdevsw iic_cdevsw = { .d_open = iicopen, .d_close = iicclose, @@ -100,7 +99,6 @@ static struct cdevsw iic_cdevsw = { .d_write = iicwrite, .d_ioctl = iicioctl, .d_name = "iic", - .d_maj = CDEV_MAJOR, }; static void diff --git a/sys/dev/isp/isp_freebsd.c b/sys/dev/isp/isp_freebsd.c index 2e70f53532fa..e7526ab94207 100644 --- a/sys/dev/isp/isp_freebsd.c +++ b/sys/dev/isp/isp_freebsd.c @@ -52,11 +52,9 @@ static void isp_kthread(void *); static void isp_action(struct cam_sim *, union ccb *); -#define ISP_CDEV_MAJOR 248 static struct cdevsw isp_cdevsw = { .d_ioctl = ispioctl, .d_name = "isp", - .d_maj = ISP_CDEV_MAJOR, }; static struct ispsoftc *isplist = NULL; diff --git a/sys/dev/joy/joy.c b/sys/dev/joy/joy.c index 9f6ff51d308f..2ef286bebef9 100644 --- a/sys/dev/joy/joy.c +++ b/sys/dev/joy/joy.c @@ -63,7 +63,6 @@ __FBSDID("$FreeBSD$"); #define JOY_SOFTC(unit) (struct joy_softc *) \ devclass_get_softc(joy_devclass,(unit)) -#define CDEV_MAJOR 51 static d_open_t joyopen; static d_close_t joyclose; static d_read_t joyread; @@ -75,7 +74,6 @@ static struct cdevsw joy_cdevsw = { .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 f4910e1ef34c..e7a67db70957 100644 --- a/sys/dev/kbd/kbd.c +++ b/sys/dev/kbd/kbd.c @@ -431,7 +431,6 @@ static d_write_t genkbdwrite; static d_ioctl_t genkbdioctl; static d_poll_t genkbdpoll; -#define CDEV_MAJOR 112 static struct cdevsw kbd_cdevsw = { .d_open = genkbdopen, @@ -441,7 +440,6 @@ static struct cdevsw kbd_cdevsw = { .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 21c160e513cd..285d57dcbf24 100644 --- a/sys/dev/mcd/mcd.c +++ b/sys/dev/mcd/mcd.c @@ -160,7 +160,6 @@ static d_close_t mcdclose; static d_ioctl_t mcdioctl; static d_strategy_t mcdstrategy; -#define CDEV_MAJOR 29 static struct cdevsw mcd_cdevsw = { .d_open = mcdopen, @@ -169,7 +168,6 @@ static struct cdevsw mcd_cdevsw = { .d_ioctl = mcdioctl, .d_strategy = mcdstrategy, .d_name = "mcd", - .d_maj = CDEV_MAJOR, .d_flags = D_DISK, }; diff --git a/sys/dev/mlx/mlx.c b/sys/dev/mlx/mlx.c index 7c450249913f..bf9412c1e989 100644 --- a/sys/dev/mlx/mlx.c +++ b/sys/dev/mlx/mlx.c @@ -53,14 +53,12 @@ #include <dev/mlx/mlxvar.h> #include <dev/mlx/mlxreg.h> -#define MLX_CDEV_MAJOR 130 static struct cdevsw mlx_cdevsw = { .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 48e8f25fea74..6dacf2778fd7 100644 --- a/sys/dev/mly/mly.c +++ b/sys/dev/mly/mly.c @@ -149,14 +149,12 @@ static driver_t mly_pci_driver = { static devclass_t mly_devclass; DRIVER_MODULE(mly, pci, mly_pci_driver, mly_devclass, 0, 0); -#define MLY_CDEV_MAJOR 158 static struct cdevsw mly_cdevsw = { .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 408bbf77c0b0..b2c821b59154 100644 --- a/sys/dev/mse/mse.c +++ b/sys/dev/mse/mse.c @@ -139,7 +139,6 @@ static d_read_t mseread; static d_ioctl_t mseioctl; static d_poll_t msepoll; -#define CDEV_MAJOR 27 static struct cdevsw mse_cdevsw = { .d_open = mseopen, .d_close = mseclose, @@ -147,7 +146,6 @@ static struct cdevsw mse_cdevsw = { .d_ioctl = mseioctl, .d_poll = msepoll, .d_name = "mse", - .d_maj = CDEV_MAJOR, }; static void mseintr(void *); diff --git a/sys/dev/ofw/ofw_console.c b/sys/dev/ofw/ofw_console.c index a0e29ea8d92d..a4b5c8f98902 100644 --- a/sys/dev/ofw/ofw_console.c +++ b/sys/dev/ofw/ofw_console.c @@ -51,7 +51,6 @@ static d_open_t ofw_dev_open; static d_close_t ofw_dev_close; static d_ioctl_t ofw_dev_ioctl; -#define CDEV_MAJOR 97 static struct cdevsw ofw_cdevsw = { .d_open = ofw_dev_open, @@ -61,7 +60,6 @@ static struct cdevsw ofw_cdevsw = { .d_ioctl = ofw_dev_ioctl, .d_poll = ttypoll, .d_name = "ofw", - .d_maj = CDEV_MAJOR, }; static struct tty *ofw_tp = NULL; @@ -106,7 +104,7 @@ cn_drvinit(void *unused) } } -SYSINIT(cndev, SI_SUB_CONFIGURE, SI_ORDER_MIDDLE + CDEV_MAJOR, cn_drvinit, NULL) +SYSINIT(cndev, SI_SUB_CONFIGURE, SI_ORDER_MIDDLE, cn_drvinit, NULL) static int stdin; static int stdout; diff --git a/sys/dev/ppbus/lpt.c b/sys/dev/ppbus/lpt.c index 1914c95c5af3..687e7ade284f 100644 --- a/sys/dev/ppbus/lpt.c +++ b/sys/dev/ppbus/lpt.c @@ -189,7 +189,6 @@ static d_write_t lptwrite; static d_read_t lptread; static d_ioctl_t lptioctl; -#define CDEV_MAJOR 16 static struct cdevsw lpt_cdevsw = { .d_open = lptopen, .d_close = lptclose, @@ -197,7 +196,6 @@ static struct cdevsw lpt_cdevsw = { .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 35dce7171ca7..bf0a01d64430 100644 --- a/sys/dev/ppbus/pcfclock.c +++ b/sys/dev/ppbus/pcfclock.c @@ -67,13 +67,11 @@ static d_open_t pcfclock_open; static d_close_t pcfclock_close; static d_read_t pcfclock_read; -#define CDEV_MAJOR 140 static struct cdevsw pcfclock_cdevsw = { .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 bccccf8688dd..c2783a66ea71 100644 --- a/sys/dev/ppbus/ppi.c +++ b/sys/dev/ppbus/ppi.c @@ -90,7 +90,6 @@ static d_ioctl_t ppiioctl; static d_write_t ppiwrite; static d_read_t ppiread; -#define CDEV_MAJOR 82 static struct cdevsw ppi_cdevsw = { .d_open = ppiopen, .d_close = ppiclose, @@ -98,7 +97,6 @@ static struct cdevsw ppi_cdevsw = { .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 08646bcba9af..e7e1373ed3cd 100644 --- a/sys/dev/ppbus/pps.c +++ b/sys/dev/ppbus/pps.c @@ -62,13 +62,11 @@ static d_open_t ppsopen; static d_close_t ppsclose; static d_ioctl_t ppsioctl; -#define CDEV_MAJOR 89 static struct cdevsw pps_cdevsw = { .d_open = ppsopen, .d_close = ppsclose, .d_ioctl = ppsioctl, .d_name = PPS_NAME, - .d_maj = CDEV_MAJOR, }; static void diff --git a/sys/dev/rc/rc.c b/sys/dev/rc/rc.c index 6817d02ce6da..f11537c4c82c 100644 --- a/sys/dev/rc/rc.c +++ b/sys/dev/rc/rc.c @@ -146,7 +146,6 @@ static d_open_t rcopen; static d_close_t rcclose; static d_ioctl_t rcioctl; -#define CDEV_MAJOR 63 static struct cdevsw rc_cdevsw = { .d_open = rcopen, .d_close = rcclose, @@ -155,7 +154,6 @@ static struct cdevsw rc_cdevsw = { .d_ioctl = rcioctl, .d_poll = ttypoll, .d_name = "rc", - .d_maj = CDEV_MAJOR, .d_flags = D_TTY, .d_kqfilter = ttykqfilter, }; diff --git a/sys/dev/rp/rp.c b/sys/dev/rp/rp.c index 8e96f5bae324..98ae4a738bd3 100644 --- a/sys/dev/rp/rp.c +++ b/sys/dev/rp/rp.c @@ -571,7 +571,6 @@ static d_close_t rpclose; static d_write_t rpwrite; static d_ioctl_t rpioctl; -#define CDEV_MAJOR 81 struct cdevsw rp_cdevsw = { .d_open = rpopen, .d_close = rpclose, @@ -580,7 +579,6 @@ struct cdevsw rp_cdevsw = { .d_ioctl = rpioctl, .d_poll = ttypoll, .d_name = "rp", - .d_maj = CDEV_MAJOR, .d_flags = D_TTY, }; diff --git a/sys/dev/scd/scd.c b/sys/dev/scd/scd.c index 89850b3705b8..d455e095902f 100644 --- a/sys/dev/scd/scd.c +++ b/sys/dev/scd/scd.c @@ -145,7 +145,6 @@ static d_close_t scdclose; static d_ioctl_t scdioctl; static d_strategy_t scdstrategy; -#define CDEV_MAJOR 45 static struct cdevsw scd_cdevsw = { .d_open = scdopen, @@ -154,7 +153,6 @@ static struct cdevsw scd_cdevsw = { .d_ioctl = scdioctl, .d_strategy = scdstrategy, .d_name = "scd", - .d_maj = CDEV_MAJOR, .d_flags = D_DISK, }; diff --git a/sys/dev/si/si.c b/sys/dev/si/si.c index 148182a46d0d..a3fd213f0e65 100644 --- a/sys/dev/si/si.c +++ b/sys/dev/si/si.c @@ -117,7 +117,6 @@ static d_close_t siclose; static d_write_t siwrite; static d_ioctl_t siioctl; -#define CDEV_MAJOR 68 static struct cdevsw si_cdevsw = { .d_open = siopen, .d_close = siclose, @@ -126,7 +125,6 @@ static struct cdevsw si_cdevsw = { .d_ioctl = siioctl, .d_poll = ttypoll, .d_name = "si", - .d_maj = CDEV_MAJOR, .d_flags = D_TTY, .d_kqfilter = ttykqfilter, }; diff --git a/sys/dev/sio/sio.c b/sys/dev/sio/sio.c index be51ac329e6b..571265ddc65b 100644 --- a/sys/dev/sio/sio.c +++ b/sys/dev/sio/sio.c @@ -322,7 +322,6 @@ static d_read_t sioread; static d_write_t siowrite; static d_ioctl_t sioioctl; -#define CDEV_MAJOR 28 static struct cdevsw sio_cdevsw = { .d_open = sioopen, .d_close = sioclose, @@ -331,7 +330,6 @@ static struct cdevsw sio_cdevsw = { .d_ioctl = sioioctl, .d_poll = ttypoll, .d_name = sio_driver_name, - .d_maj = CDEV_MAJOR, .d_flags = D_TTY, .d_kqfilter = ttykqfilter, }; diff --git a/sys/dev/smbus/smb.c b/sys/dev/smbus/smb.c index b7cfff991afc..280bda52da49 100644 --- a/sys/dev/smbus/smb.c +++ b/sys/dev/smbus/smb.c @@ -87,7 +87,6 @@ static d_write_t smbwrite; static d_read_t smbread; static d_ioctl_t smbioctl; -#define CDEV_MAJOR 106 static struct cdevsw smb_cdevsw = { .d_open = smbopen, .d_close = smbclose, @@ -95,7 +94,6 @@ static struct cdevsw smb_cdevsw = { .d_write = smbwrite, .d_ioctl = smbioctl, .d_name = "smb", - .d_maj = CDEV_MAJOR, }; static void diff --git a/sys/dev/speaker/spkr.c b/sys/dev/speaker/spkr.c index be3ad4209310..e82ef46c9f40 100644 --- a/sys/dev/speaker/spkr.c +++ b/sys/dev/speaker/spkr.c @@ -33,14 +33,12 @@ static d_close_t spkrclose; static d_write_t spkrwrite; static d_ioctl_t spkrioctl; -#define CDEV_MAJOR 26 static struct cdevsw spkr_cdevsw = { .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 cc50c3b8e854..8e5ac5713bbd 100644 --- a/sys/dev/streams/streams.c +++ b/sys/dev/streams/streams.c @@ -101,11 +101,9 @@ static struct fileops svr4_netops = { .fo_close = svr4_soo_close }; -#define CDEV_MAJOR 103 static struct cdevsw streams_cdevsw = { .d_open = streamsopen, .d_name = "streams", - .d_maj = CDEV_MAJOR, }; struct streams_softc { diff --git a/sys/dev/syscons/sysmouse.c b/sys/dev/syscons/sysmouse.c index 738431002053..a7cff80c6bfe 100644 --- a/sys/dev/syscons/sysmouse.c +++ b/sys/dev/syscons/sysmouse.c @@ -42,7 +42,6 @@ __FBSDID("$FreeBSD$"); #ifndef SC_NO_SYSMOUSE -#define CDEV_MAJOR 12 /* major number, shared with syscons */ #define SC_MOUSE 128 /* minor number */ static d_open_t smopen; @@ -56,7 +55,6 @@ static struct cdevsw sm_cdevsw = { .d_ioctl = smioctl, .d_poll = ttypoll, .d_name = "sysmouse", - .d_maj = CDEV_MAJOR, .d_flags = D_TTY, }; @@ -255,8 +253,7 @@ sm_attach_mouse(void *unused) /* sysmouse doesn't have scr_stat */ } -SYSINIT(sysmouse, SI_SUB_DRIVERS, SI_ORDER_MIDDLE + CDEV_MAJOR, - sm_attach_mouse, NULL) +SYSINIT(sysmouse, SI_SUB_DRIVERS, SI_ORDER_MIDDLE, sm_attach_mouse, NULL) int sysmouse_event(mouse_info_t *info) diff --git a/sys/dev/tdfx/tdfx_pci.c b/sys/dev/tdfx/tdfx_pci.c index b57a596f8efe..dda1eb5a27eb 100644 --- a/sys/dev/tdfx/tdfx_pci.c +++ b/sys/dev/tdfx/tdfx_pci.c @@ -109,7 +109,6 @@ static struct cdevsw tdfx_cdev = { .d_ioctl = tdfx_ioctl, .d_mmap = tdfx_mmap, .d_name = "tdfx", - .d_maj = CDEV_MAJOR, }; static int diff --git a/sys/dev/tdfx/tdfx_vars.h b/sys/dev/tdfx/tdfx_vars.h index 55bb060ea0df..67ce1319cee8 100644 --- a/sys/dev/tdfx/tdfx_vars.h +++ b/sys/dev/tdfx/tdfx_vars.h @@ -42,7 +42,6 @@ #include <sys/bus.h> #include <sys/cdefs.h> -#define CDEV_MAJOR 107 #define PCI_DEVICE_ALLIANCE_AT3D 0x643d1142 #define PCI_DEVICE_3DFX_VOODOO1 0x0001121a #define PCI_DEVICE_3DFX_VOODOO2 0x0002121a diff --git a/sys/dev/ti/if_ti.c b/sys/dev/ti/if_ti.c index c5f3fc032ea2..9e8c8f1165e7 100644 --- a/sys/dev/ti/if_ti.c +++ b/sys/dev/ti/if_ti.c @@ -180,7 +180,6 @@ static struct ti_type ti_devs[] = { { 0, 0, NULL } }; -#define TI_CDEV_MAJOR 153 static d_open_t ti_open; static d_close_t ti_close; @@ -191,7 +190,6 @@ static struct cdevsw ti_cdevsw = { .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 6f3f02bbe9ec..6a3a8ff09db3 100644 --- a/sys/dev/twe/twe_freebsd.c +++ b/sys/dev/twe/twe_freebsd.c @@ -71,7 +71,6 @@ static struct cdevsw twe_cdevsw = { .d_close = twe_close, .d_ioctl = twe_ioctl_wrapper, .d_name = "twe", - .d_maj = TWE_CDEV_MAJOR, }; /******************************************************************************** diff --git a/sys/dev/twe/twevar.h b/sys/dev/twe/twevar.h index 63700daf6425..e39c88e7d75c 100644 --- a/sys/dev/twe/twevar.h +++ b/sys/dev/twe/twevar.h @@ -32,8 +32,6 @@ * <major change>.<external release>.<3ware internal release>.<development release> */ #define TWE_DRIVER_VERSION_STRING "1.50.00.000" -#define TWE_CDEV_MAJOR 146 -#define TWED_CDEV_MAJOR 147 #ifdef TWE_DEBUG #define debug(level, fmt, args...) \ diff --git a/sys/dev/usb/ucom.c b/sys/dev/usb/ucom.c index e42657c6f465..9298d087c18c 100644 --- a/sys/dev/usb/ucom.c +++ b/sys/dev/usb/ucom.c @@ -126,7 +126,6 @@ Static d_read_t ucomread; Static d_write_t ucomwrite; Static d_ioctl_t ucomioctl; -#define UCOM_CDEV_MAJOR 138 static struct cdevsw ucom_cdevsw = { .d_open = ucomopen, @@ -136,7 +135,6 @@ static struct cdevsw ucom_cdevsw = { .d_ioctl = ucomioctl, .d_poll = ttypoll, .d_name = "ucom", - .d_maj = UCOM_CDEV_MAJOR, .d_flags = D_TTY, #if __FreeBSD_version < 500014 .d_bmaj = -1, diff --git a/sys/dev/usb/ufm.c b/sys/dev/usb/ufm.c index 7fcecfdbd9e4..26916f1f4f39 100644 --- a/sys/dev/usb/ufm.c +++ b/sys/dev/usb/ufm.c @@ -88,18 +88,11 @@ d_open_t ufmopen; d_close_t ufmclose; d_ioctl_t ufmioctl; -#if __FreeBSD_version >= 500000 -#define UFM_CDEV_MAJOR MAJOR_AUTO -#else -#define UFM_CDEV_MAJOR 200 -#endif - Static struct cdevsw ufm_cdevsw = { .d_open = ufmopen, .d_close = ufmclose, .d_ioctl = ufmioctl, .d_name = "ufm", - .d_maj = UFM_CDEV_MAJOR, #if (__FreeBSD_version < 500014) .d_bmaj = -1 #endif diff --git a/sys/dev/usb/ugen.c b/sys/dev/usb/ugen.c index 8740c3d7fef0..408d14b06bdc 100644 --- a/sys/dev/usb/ugen.c +++ b/sys/dev/usb/ugen.c @@ -149,7 +149,6 @@ d_write_t ugenwrite; d_ioctl_t ugenioctl; d_poll_t ugenpoll; -#define UGEN_CDEV_MAJOR 114 Static struct cdevsw ugen_cdevsw = { .d_open = ugenopen, @@ -159,7 +158,6 @@ Static struct cdevsw ugen_cdevsw = { .d_ioctl = ugenioctl, .d_poll = ugenpoll, .d_name = "ugen", - .d_maj = UGEN_CDEV_MAJOR, #if __FreeBSD_version < 500014 .d_bmaj -1 #endif diff --git a/sys/dev/usb/uhid.c b/sys/dev/usb/uhid.c index 2451542f7946..ec46474a1c0b 100644 --- a/sys/dev/usb/uhid.c +++ b/sys/dev/usb/uhid.c @@ -154,7 +154,6 @@ d_write_t uhidwrite; d_ioctl_t uhidioctl; d_poll_t uhidpoll; -#define UHID_CDEV_MAJOR 122 Static struct cdevsw uhid_cdevsw = { .d_open = uhidopen, @@ -164,7 +163,6 @@ Static struct cdevsw uhid_cdevsw = { .d_ioctl = uhidioctl, .d_poll = uhidpoll, .d_name = "uhid", - .d_maj = UHID_CDEV_MAJOR, #if __FreeBSD_version < 500014 .d_bmaj -1 #endif diff --git a/sys/dev/usb/ulpt.c b/sys/dev/usb/ulpt.c index 6df5ff3a2fe3..3dadd00633f2 100644 --- a/sys/dev/usb/ulpt.c +++ b/sys/dev/usb/ulpt.c @@ -145,7 +145,6 @@ Static d_close_t ulptclose; Static d_write_t ulptwrite; Static d_ioctl_t ulptioctl; -#define ULPT_CDEV_MAJOR 113 Static struct cdevsw ulpt_cdevsw = { .d_open = ulptopen, @@ -153,7 +152,6 @@ Static struct cdevsw ulpt_cdevsw = { .d_write = ulptwrite, .d_ioctl = ulptioctl, .d_name = "ulpt", - .d_maj = ULPT_CDEV_MAJOR, #if __FreeBSD_version < 500014 .d_bmaj -1 #endif diff --git a/sys/dev/usb/ums.c b/sys/dev/usb/ums.c index dea1e0b8f827..4c0d598045da 100644 --- a/sys/dev/usb/ums.c +++ b/sys/dev/usb/ums.c @@ -152,7 +152,6 @@ Static d_read_t ums_read; Static d_ioctl_t ums_ioctl; Static d_poll_t ums_poll; -#define UMS_CDEV_MAJOR 111 Static struct cdevsw ums_cdevsw = { .d_open = ums_open, @@ -161,7 +160,6 @@ Static struct cdevsw ums_cdevsw = { .d_ioctl = ums_ioctl, .d_poll = ums_poll, .d_name = "ums", - .d_maj = UMS_CDEV_MAJOR, #if __FreeBSD_version < 500014 .d_bmaj -1 #endif diff --git a/sys/dev/usb/urio.c b/sys/dev/usb/urio.c index 6614a33eb93e..57979cdf3f38 100644 --- a/sys/dev/usb/urio.c +++ b/sys/dev/usb/urio.c @@ -115,7 +115,6 @@ d_read_t urioread; d_write_t uriowrite; d_ioctl_t urioioctl; -#define URIO_CDEV_MAJOR 143 Static struct cdevsw urio_cdevsw = { .d_open = urioopen, @@ -124,7 +123,6 @@ Static struct cdevsw urio_cdevsw = { .d_write = uriowrite, .d_ioctl = urioioctl, .d_name = "urio", - .d_maj = URIO_CDEV_MAJOR, #if __FreeBSD_version < 500014 .d_bmaj = -1 #endif diff --git a/sys/dev/usb/usb.c b/sys/dev/usb/usb.c index 4f9034a226ca..6ff8ed3e81e8 100644 --- a/sys/dev/usb/usb.c +++ b/sys/dev/usb/usb.c @@ -152,7 +152,6 @@ struct cdevsw usb_cdevsw = { .d_ioctl = usbioctl, .d_poll = usbpoll, .d_name = "usb", - .d_maj = USB_CDEV_MAJOR, #if __FreeBSD_version < 500014 .d_bmaj = -1 #endif diff --git a/sys/dev/usb/usbdi.h b/sys/dev/usb/usbdi.h index 146f8caa878f..b9e1c1e19423 100644 --- a/sys/dev/usb/usbdi.h +++ b/sys/dev/usb/usbdi.h @@ -89,7 +89,6 @@ typedef void (*usbd_callback)(usbd_xfer_handle, usbd_private_handle, #define USBD_DEFAULT_TIMEOUT 5000 /* ms = 5 s */ #if defined(__FreeBSD__) -#define USB_CDEV_MAJOR 108 #endif usbd_status usbd_open_pipe(usbd_interface_handle iface, u_int8_t address, diff --git a/sys/dev/usb/uscanner.c b/sys/dev/usb/uscanner.c index 7d83f570f4cf..ab46721c113a 100644 --- a/sys/dev/usb/uscanner.c +++ b/sys/dev/usb/uscanner.c @@ -266,7 +266,6 @@ d_read_t uscannerread; d_write_t uscannerwrite; d_poll_t uscannerpoll; -#define USCANNER_CDEV_MAJOR 156 Static struct cdevsw uscanner_cdevsw = { .d_open = uscanneropen, @@ -275,7 +274,6 @@ Static struct cdevsw uscanner_cdevsw = { .d_write = uscannerwrite, .d_poll = uscannerpoll, .d_name = "uscanner", - .d_maj = USCANNER_CDEV_MAJOR, #if __FreeBSD_version < 500014 .d_bmaj -1 #endif diff --git a/sys/i386/acpica/acpi_machdep.c b/sys/i386/acpica/acpi_machdep.c index d382bc6410ad..a6c186a9a610 100644 --- a/sys/i386/acpica/acpi_machdep.c +++ b/sys/i386/acpica/acpi_machdep.c @@ -72,7 +72,6 @@ static d_write_t apmwrite; static d_ioctl_t apmioctl; static d_poll_t apmpoll; -#define CDEV_MAJOR 39 static struct cdevsw apm_cdevsw = { .d_open = apmopen, .d_close = apmclose, @@ -80,7 +79,6 @@ static struct cdevsw apm_cdevsw = { .d_ioctl = apmioctl, .d_poll = apmpoll, .d_name = "apm", - .d_maj = CDEV_MAJOR, }; static int intr_model = ACPI_INTR_PIC; diff --git a/sys/i386/bios/apm.c b/sys/i386/bios/apm.c index 64337c4c9d3d..1e2371fef54a 100644 --- a/sys/i386/bios/apm.c +++ b/sys/i386/bios/apm.c @@ -107,7 +107,6 @@ static d_write_t apmwrite; static d_ioctl_t apmioctl; static d_poll_t apmpoll; -#define CDEV_MAJOR 39 static struct cdevsw apm_cdevsw = { .d_open = apmopen, .d_close = apmclose, @@ -115,7 +114,6 @@ static struct cdevsw apm_cdevsw = { .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 ed1267eed6ca..200bcfc760fb 100644 --- a/sys/i386/bios/smapi.c +++ b/sys/i386/bios/smapi.c @@ -77,7 +77,6 @@ static d_ioctl_t smapi_ioctl; static struct cdevsw smapi_cdevsw = { .d_ioctl = smapi_ioctl, .d_name = "smapi", - .d_maj = MAJOR_AUTO, .d_flags = D_MEM, }; diff --git a/sys/i386/i386/perfmon.c b/sys/i386/i386/perfmon.c index a5cd307b55ed..3b765f49223a 100644 --- a/sys/i386/i386/perfmon.c +++ b/sys/i386/i386/perfmon.c @@ -71,13 +71,11 @@ static d_ioctl_t perfmon_ioctl; static void perfmon_init_dev(void *); 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 = { .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 23a9801da66e..8aff8c105f62 100644 --- a/sys/i386/isa/asc.c +++ b/sys/i386/isa/asc.c @@ -195,7 +195,6 @@ static d_read_t ascread; static d_ioctl_t ascioctl; static d_poll_t ascpoll; -#define CDEV_MAJOR 71 static struct cdevsw asc_cdevsw = { .d_open = ascopen, @@ -204,7 +203,6 @@ static struct cdevsw asc_cdevsw = { .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 db26c40ba7b2..28adedc60f48 100644 --- a/sys/i386/isa/ctx.c +++ b/sys/i386/isa/ctx.c @@ -141,7 +141,6 @@ static d_close_t ctxclose; static d_read_t ctxread; static d_write_t ctxwrite; static d_ioctl_t ctxioctl; -#define CDEV_MAJOR 40 static struct cdevsw ctx_cdevsw = { .d_open = ctxopen, @@ -150,7 +149,6 @@ static struct cdevsw ctx_cdevsw = { .d_write = ctxwrite, .d_ioctl = ctxioctl, .d_name = "ctx", - .d_maj = CDEV_MAJOR, }; diff --git a/sys/i386/isa/cy.c b/sys/i386/isa/cy.c index 203ed94c60e5..4351a3051de8 100644 --- a/sys/i386/isa/cy.c +++ b/sys/i386/isa/cy.c @@ -385,7 +385,6 @@ static d_close_t sioclose; static d_write_t siowrite; static d_ioctl_t sioioctl; -#define CDEV_MAJOR 48 static struct cdevsw sio_cdevsw = { .d_open = sioopen, .d_close = sioclose, @@ -394,7 +393,6 @@ static struct cdevsw sio_cdevsw = { .d_ioctl = sioioctl, .d_poll = ttypoll, .d_name = driver_name, - .d_maj = CDEV_MAJOR, .d_flags = D_TTY, .d_kqfilter = ttykqfilter, }; diff --git a/sys/i386/isa/gpib.c b/sys/i386/isa/gpib.c index 26102df178b3..480448a14071 100644 --- a/sys/i386/isa/gpib.c +++ b/sys/i386/isa/gpib.c @@ -72,14 +72,12 @@ static d_close_t gpclose; static d_write_t gpwrite; static d_ioctl_t gpioctl; -#define CDEV_MAJOR 44 static struct cdevsw gp_cdevsw = { .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 a59f49345e33..d4dff76327a8 100644 --- a/sys/i386/isa/gsc.c +++ b/sys/i386/isa/gsc.c @@ -191,14 +191,12 @@ static d_close_t gscclose; static d_read_t gscread; static d_ioctl_t gscioctl; -#define CDEV_MAJOR 47 static struct cdevsw gsc_cdevsw = { .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 7f27ad7e8865..e44400dc48a9 100644 --- a/sys/i386/isa/istallion.c +++ b/sys/i386/isa/istallion.c @@ -642,7 +642,6 @@ COMPAT_ISA_DRIVER(stli, stlidriver); * FreeBSD-2.2+ kernel linkage. */ -#define CDEV_MAJOR 75 static struct cdevsw stli_cdevsw = { .d_open = stliopen, .d_close = stliclose, @@ -651,7 +650,6 @@ static struct cdevsw stli_cdevsw = { .d_ioctl = stliioctl, .d_poll = ttypoll, .d_name = stli_drvname, - .d_maj = CDEV_MAJOR, .d_flags = D_TTY, .d_kqfilter = ttykqfilter, }; diff --git a/sys/i386/isa/mse.c b/sys/i386/isa/mse.c index 408bbf77c0b0..b2c821b59154 100644 --- a/sys/i386/isa/mse.c +++ b/sys/i386/isa/mse.c @@ -139,7 +139,6 @@ static d_read_t mseread; static d_ioctl_t mseioctl; static d_poll_t msepoll; -#define CDEV_MAJOR 27 static struct cdevsw mse_cdevsw = { .d_open = mseopen, .d_close = mseclose, @@ -147,7 +146,6 @@ static struct cdevsw mse_cdevsw = { .d_ioctl = mseioctl, .d_poll = msepoll, .d_name = "mse", - .d_maj = CDEV_MAJOR, }; static void mseintr(void *); diff --git a/sys/i386/isa/pcvt/pcvt_drv.c b/sys/i386/isa/pcvt/pcvt_drv.c index 38c1ced77314..351048020351 100644 --- a/sys/i386/isa/pcvt/pcvt_drv.c +++ b/sys/i386/isa/pcvt/pcvt_drv.c @@ -93,7 +93,6 @@ static d_close_t pcvt_close; static d_ioctl_t pcvt_ioctl; static d_mmap_t pcvt_mmap; -#define CDEV_MAJOR 12 static struct cdevsw vt_cdevsw = { .d_open = pcvt_open, @@ -104,7 +103,6 @@ static struct cdevsw vt_cdevsw = { .d_poll = ttypoll, .d_mmap = pcvt_mmap, .d_name = "vt", - .d_maj = CDEV_MAJOR, .d_flags = D_TTY, .d_kqfilter = ttykqfilter, }; diff --git a/sys/i386/isa/spic.c b/sys/i386/isa/spic.c index 93985e411445..e73b8b6dbc05 100644 --- a/sys/i386/isa/spic.c +++ b/sys/i386/isa/spic.c @@ -91,7 +91,6 @@ static struct cdevsw spic_cdevsw = { .d_ioctl = spicioctl, .d_poll = spicpoll, .d_name = "spic", - .d_maj = CDEV_MAJOR, }; #define SCBUFLEN 128 diff --git a/sys/i386/isa/spicreg.h b/sys/i386/isa/spicreg.h index 62a12abb761b..7657f3ea7729 100644 --- a/sys/i386/isa/spicreg.h +++ b/sys/i386/isa/spicreg.h @@ -27,7 +27,6 @@ * */ -#define CDEV_MAJOR 160 /* * Find the PCI device that holds the G10 register needed to map in the SPIC diff --git a/sys/i386/isa/spigot.c b/sys/i386/isa/spigot.c index 0b568f312bd0..dd23abd690d2 100644 --- a/sys/i386/isa/spigot.c +++ b/sys/i386/isa/spigot.c @@ -104,7 +104,6 @@ static d_write_t spigot_write; static d_ioctl_t spigot_ioctl; static d_mmap_t spigot_mmap; -#define CDEV_MAJOR 11 static struct cdevsw spigot_cdevsw = { .d_open = spigot_open, .d_close = spigot_close, @@ -113,7 +112,6 @@ static struct cdevsw spigot_cdevsw = { .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 be3ad4209310..e82ef46c9f40 100644 --- a/sys/i386/isa/spkr.c +++ b/sys/i386/isa/spkr.c @@ -33,14 +33,12 @@ static d_close_t spkrclose; static d_write_t spkrwrite; static d_ioctl_t spkrioctl; -#define CDEV_MAJOR 26 static struct cdevsw spkr_cdevsw = { .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 54d186d09ca4..4665491dd57d 100644 --- a/sys/i386/isa/stallion.c +++ b/sys/i386/isa/stallion.c @@ -536,7 +536,6 @@ COMPAT_PCI_DRIVER (stlpci, stlpcidriver); * FreeBSD-2.2+ kernel linkage. */ -#define CDEV_MAJOR 72 static struct cdevsw stl_cdevsw = { .d_open = stlopen, .d_close = stlclose, @@ -545,7 +544,6 @@ static struct cdevsw stl_cdevsw = { .d_ioctl = stlioctl, .d_poll = ttypoll, .d_name = "stl", - .d_maj = CDEV_MAJOR, .d_flags = D_TTY, .d_kqfilter = ttykqfilter, }; diff --git a/sys/i386/isa/wt.c b/sys/i386/isa/wt.c index 22257f7eb030..941fc082f403 100644 --- a/sys/i386/isa/wt.c +++ b/sys/i386/isa/wt.c @@ -184,7 +184,6 @@ static d_close_t wtclose; static d_ioctl_t wtioctl; static d_strategy_t wtstrategy; -#define CDEV_MAJOR 10 static struct cdevsw wt_cdevsw = { .d_open = wtopen, @@ -194,7 +193,6 @@ static struct cdevsw wt_cdevsw = { .d_ioctl = wtioctl, .d_strategy = wtstrategy, .d_name = "wt", - .d_maj = CDEV_MAJOR, }; diff --git a/sys/i4b/driver/i4b_ctl.c b/sys/i4b/driver/i4b_ctl.c index f71ae632fbf4..79cd1ab57fa6 100644 --- a/sys/i4b/driver/i4b_ctl.c +++ b/sys/i4b/driver/i4b_ctl.c @@ -56,7 +56,6 @@ static d_close_t i4bctlclose; static d_ioctl_t i4bctlioctl; static d_poll_t i4bctlpoll; -#define CDEV_MAJOR 55 static struct cdevsw i4bctl_cdevsw = { .d_open = i4bctlopen, @@ -64,7 +63,6 @@ static struct cdevsw i4bctl_cdevsw = { .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 cb68c6cd53cb..f632186d4c28 100644 --- a/sys/i4b/driver/i4b_rbch.c +++ b/sys/i4b/driver/i4b_rbch.c @@ -110,7 +110,6 @@ static d_read_t i4brbchwrite; static d_ioctl_t i4brbchioctl; static d_poll_t i4brbchpoll; -#define CDEV_MAJOR 57 static struct cdevsw i4brbch_cdevsw = { .d_open = i4brbchopen, @@ -120,7 +119,6 @@ static struct cdevsw i4brbch_cdevsw = { .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 de0833dac5c5..5acce731a376 100644 --- a/sys/i4b/driver/i4b_tel.c +++ b/sys/i4b/driver/i4b_tel.c @@ -132,7 +132,6 @@ static d_read_t i4btelwrite; static d_ioctl_t i4btelioctl; static d_poll_t i4btelpoll; -#define CDEV_MAJOR 56 static struct cdevsw i4btel_cdevsw = { .d_open = i4btelopen, @@ -142,7 +141,6 @@ static struct cdevsw i4btel_cdevsw = { .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 ea92b18884ab..348c6dd49b22 100644 --- a/sys/i4b/driver/i4b_trace.c +++ b/sys/i4b/driver/i4b_trace.c @@ -73,7 +73,6 @@ static d_read_t i4btrcread; static d_ioctl_t i4btrcioctl; static d_poll_t i4btrcpoll; -#define CDEV_MAJOR 59 static struct cdevsw i4btrc_cdevsw = { .d_open = i4btrcopen, @@ -82,7 +81,6 @@ static struct cdevsw i4btrc_cdevsw = { .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 e17ad85e3dfe..42330efdc729 100644 --- a/sys/i4b/layer4/i4b_i4bdrv.c +++ b/sys/i4b/layer4/i4b_i4bdrv.c @@ -76,7 +76,6 @@ static d_read_t i4bread; static d_ioctl_t i4bioctl; static d_poll_t i4bpoll; -#define CDEV_MAJOR 60 static struct cdevsw i4b_cdevsw = { .d_open = i4bopen, @@ -85,7 +84,6 @@ static struct cdevsw i4b_cdevsw = { .d_ioctl = i4bioctl, .d_poll = i4bpoll, .d_name = "i4b", - .d_maj = CDEV_MAJOR, }; static void i4battach(void *); diff --git a/sys/ia64/ia64/ssc.c b/sys/ia64/ia64/ssc.c index be746a184cb6..551ff0b55288 100644 --- a/sys/ia64/ia64/ssc.c +++ b/sys/ia64/ia64/ssc.c @@ -57,7 +57,6 @@ static d_open_t sscopen; static d_close_t sscclose; static d_ioctl_t sscioctl; -#define CDEV_MAJOR 97 static struct cdevsw ssc_cdevsw = { .d_open = sscopen, .d_close = sscclose, @@ -66,7 +65,6 @@ static struct cdevsw ssc_cdevsw = { .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 5cc94086bcb5..5a506334d5c4 100644 --- a/sys/isa/fd.c +++ b/sys/isa/fd.c @@ -481,7 +481,6 @@ fdin_rd(fdc_p fdc) return bus_space_read_1(fdc->portt, fdc->porth, FDIN); } -#define CDEV_MAJOR 9 static struct cdevsw fd_cdevsw = { .d_open = fdopen, .d_close = fdclose, @@ -490,7 +489,6 @@ static struct cdevsw fd_cdevsw = { .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 4b1277632024..e886e8cc9e4b 100644 --- a/sys/isa/psm.c +++ b/sys/isa/psm.c @@ -346,7 +346,6 @@ static driver_t psm_driver = { sizeof(struct psm_softc), }; -#define CDEV_MAJOR 21 static struct cdevsw psm_cdevsw = { .d_open = psmopen, @@ -355,7 +354,6 @@ static struct cdevsw psm_cdevsw = { .d_ioctl = psmioctl, .d_poll = psmpoll, .d_name = PSM_DRIVER_NAME, - .d_maj = CDEV_MAJOR, }; /* debug message level */ diff --git a/sys/net/bpf.c b/sys/net/bpf.c index f829e6260330..9a8d35a9e83d 100644 --- a/sys/net/bpf.c +++ b/sys/net/bpf.c @@ -126,7 +126,6 @@ static d_ioctl_t bpfioctl; static d_poll_t bpfpoll; static d_kqfilter_t bpfkqfilter; -#define CDEV_MAJOR 23 static struct cdevsw bpf_cdevsw = { .d_open = bpfopen, .d_close = bpfclose, @@ -135,7 +134,6 @@ static struct cdevsw bpf_cdevsw = { .d_ioctl = bpfioctl, .d_poll = bpfpoll, .d_name = "bpf", - .d_maj = CDEV_MAJOR, .d_kqfilter = bpfkqfilter, }; @@ -1598,7 +1596,7 @@ bpf_drvinit(unused) EVENTHANDLER_REGISTER(dev_clone, bpf_clone, 0, 1000); } -SYSINIT(bpfdev,SI_SUB_DRIVERS,SI_ORDER_MIDDLE+CDEV_MAJOR,bpf_drvinit,NULL) +SYSINIT(bpfdev,SI_SUB_DRIVERS,SI_ORDER_MIDDLE,bpf_drvinit,NULL) #else /* !DEV_BPF && !NETGRAPH_BPF */ /* diff --git a/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c b/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c index dd5ef6568f48..e353caf007fa 100644 --- a/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c +++ b/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c @@ -225,12 +225,6 @@ Static d_poll_t ubt_poll; Static void ubt_create_device_nodes (ubt_softc_p); Static void ubt_destroy_device_nodes (ubt_softc_p); -#if __FreeBSD_version < 500104 -#define CDEV_MAJOR 222 -#else -#define CDEV_MAJOR MAJOR_AUTO -#endif - Static struct cdevsw ubt_cdevsw = { .d_open = ubt_open, .d_close = ubt_close, @@ -239,7 +233,6 @@ Static struct cdevsw ubt_cdevsw = { .d_ioctl = ubt_ioctl, .d_poll = ubt_poll, .d_name = "ubt", - .d_maj = CDEV_MAJOR, }; /* diff --git a/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c b/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c index 8e4eeb2491d5..44e763fe73a8 100644 --- a/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c +++ b/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c @@ -91,12 +91,6 @@ Static d_write_t ubtbcmfw_write; Static d_ioctl_t ubtbcmfw_ioctl; Static d_poll_t ubtbcmfw_poll; -#if __FreeBSD_version < 500104 -#define CDEV_MAJOR 223 -#else -#define CDEV_MAJOR MAJOR_AUTO -#endif - Static struct cdevsw ubtbcmfw_cdevsw = { .d_open = ubtbcmfw_open, .d_close = ubtbcmfw_close, @@ -105,7 +99,6 @@ Static struct cdevsw ubtbcmfw_cdevsw = { .d_ioctl = ubtbcmfw_ioctl, .d_poll = ubtbcmfw_poll, .d_name = "ubtbcmfw", - .d_maj = CDEV_MAJOR, }; /* diff --git a/sys/netgraph/ng_device.c b/sys/netgraph/ng_device.c index b05c515b5c4b..ae3237fa33da 100644 --- a/sys/netgraph/ng_device.c +++ b/sys/netgraph/ng_device.c @@ -112,7 +112,6 @@ static d_write_t ngdwrite; static d_ioctl_t ngdioctl; static d_poll_t ngdpoll; -#define NGD_CDEV_MAJOR 20 static struct cdevsw ngd_cdevsw = { .d_open = ngdopen, .d_close = ngdclose, @@ -121,7 +120,6 @@ static struct cdevsw ngd_cdevsw = { .d_ioctl = ngdioctl, .d_poll = ngdpoll, .d_name = "ngd", - .d_maj = NGD_CDEV_MAJOR, }; /* diff --git a/sys/pc98/cbus/fdc.c b/sys/pc98/cbus/fdc.c index 77961b3d8368..a2ebaa4ce381 100644 --- a/sys/pc98/cbus/fdc.c +++ b/sys/pc98/cbus/fdc.c @@ -622,7 +622,6 @@ fdin_rd(fdc_p fdc) } #endif /* PC98 */ -#define CDEV_MAJOR 9 static struct cdevsw fd_cdevsw = { .d_open = fdopen, .d_close = fdclose, @@ -631,7 +630,6 @@ static struct cdevsw fd_cdevsw = { .d_ioctl = fdioctl, .d_strategy = fdstrategy, .d_name = "fd", - .d_maj = CDEV_MAJOR, .d_flags = D_DISK, }; diff --git a/sys/pc98/cbus/olpt.c b/sys/pc98/cbus/olpt.c index e21e35400834..f17604617487 100644 --- a/sys/pc98/cbus/olpt.c +++ b/sys/pc98/cbus/olpt.c @@ -229,14 +229,12 @@ static d_close_t lptclose; static d_write_t lptwrite; static d_ioctl_t lptioctl; -#define CDEV_MAJOR 16 static struct cdevsw lpt_cdevsw = { .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 4e3467110e1c..6c865853ddb5 100644 --- a/sys/pc98/cbus/sio.c +++ b/sys/pc98/cbus/sio.c @@ -415,7 +415,6 @@ static d_read_t sioread; static d_write_t siowrite; static d_ioctl_t sioioctl; -#define CDEV_MAJOR 28 static struct cdevsw sio_cdevsw = { .d_open = sioopen, .d_close = sioclose, @@ -424,7 +423,6 @@ static struct cdevsw sio_cdevsw = { .d_ioctl = sioioctl, .d_poll = ttypoll, .d_name = sio_driver_name, - .d_maj = CDEV_MAJOR, .d_flags = D_TTY, .d_kqfilter = ttykqfilter, }; diff --git a/sys/pc98/pc98/fd.c b/sys/pc98/pc98/fd.c index 77961b3d8368..a2ebaa4ce381 100644 --- a/sys/pc98/pc98/fd.c +++ b/sys/pc98/pc98/fd.c @@ -622,7 +622,6 @@ fdin_rd(fdc_p fdc) } #endif /* PC98 */ -#define CDEV_MAJOR 9 static struct cdevsw fd_cdevsw = { .d_open = fdopen, .d_close = fdclose, @@ -631,7 +630,6 @@ static struct cdevsw fd_cdevsw = { .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 fe55e7f9a6b5..cc439a0b17ff 100644 --- a/sys/pc98/pc98/mse.c +++ b/sys/pc98/pc98/mse.c @@ -136,7 +136,6 @@ static d_read_t mseread; static d_ioctl_t mseioctl; static d_poll_t msepoll; -#define CDEV_MAJOR 27 static struct cdevsw mse_cdevsw = { .d_open = mseopen, .d_close = mseclose, @@ -144,7 +143,6 @@ static struct cdevsw mse_cdevsw = { .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 e21e35400834..f17604617487 100644 --- a/sys/pc98/pc98/olpt.c +++ b/sys/pc98/pc98/olpt.c @@ -229,14 +229,12 @@ static d_close_t lptclose; static d_write_t lptwrite; static d_ioctl_t lptioctl; -#define CDEV_MAJOR 16 static struct cdevsw lpt_cdevsw = { .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/sio.c b/sys/pc98/pc98/sio.c index 4e3467110e1c..6c865853ddb5 100644 --- a/sys/pc98/pc98/sio.c +++ b/sys/pc98/pc98/sio.c @@ -415,7 +415,6 @@ static d_read_t sioread; static d_write_t siowrite; static d_ioctl_t sioioctl; -#define CDEV_MAJOR 28 static struct cdevsw sio_cdevsw = { .d_open = sioopen, .d_close = sioclose, @@ -424,7 +423,6 @@ static struct cdevsw sio_cdevsw = { .d_ioctl = sioioctl, .d_poll = ttypoll, .d_name = sio_driver_name, - .d_maj = CDEV_MAJOR, .d_flags = D_TTY, .d_kqfilter = ttykqfilter, }; diff --git a/sys/pc98/pc98/wd_cd.c b/sys/pc98/pc98/wd_cd.c index 31a25d2633ca..878091716967 100644 --- a/sys/pc98/pc98/wd_cd.c +++ b/sys/pc98/pc98/wd_cd.c @@ -47,7 +47,6 @@ static d_close_t acdclose; static d_ioctl_t acdioctl; static d_strategy_t acdstrategy; -#define CDEV_MAJOR 69 static struct cdevsw acd_cdevsw = { .d_open = acdopen, @@ -57,7 +56,6 @@ static struct cdevsw acd_cdevsw = { .d_ioctl = acdioctl, .d_strategy = acdstrategy, .d_name = "wcd", - .d_maj = CDEV_MAJOR, .d_flags = D_DISK, }; diff --git a/sys/pccard/pccard.c b/sys/pccard/pccard.c index b1ef84a9692d..bc5f240c0ae1 100644 --- a/sys/pccard/pccard.c +++ b/sys/pccard/pccard.c @@ -80,11 +80,6 @@ static d_write_t crdwrite; static d_ioctl_t crdioctl; static d_poll_t crdpoll; -#if __FreeBSD_version < 500000 -#define CDEV_MAJOR 50 -#else -#define CDEV_MAJOR MAJOR_AUTO -#endif static struct cdevsw crd_cdevsw = { .d_open = crdopen, .d_close = crdclose, @@ -93,7 +88,6 @@ static struct cdevsw crd_cdevsw = { .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 2ae2b72e20ad..6f09660fad6a 100644 --- a/sys/pci/agp.c +++ b/sys/pci/agp.c @@ -63,7 +63,6 @@ MODULE_VERSION(agp, 1); MALLOC_DEFINE(M_AGP, "agp", "AGP data structures"); -#define CDEV_MAJOR 148 /* agp_drv.c */ static d_open_t agp_open; static d_close_t agp_close; @@ -76,7 +75,6 @@ static struct cdevsw agp_cdevsw = { .d_ioctl = agp_ioctl, .d_mmap = agp_mmap, .d_name = "agp", - .d_maj = CDEV_MAJOR, }; static devclass_t agp_devclass; diff --git a/sys/pci/if_ti.c b/sys/pci/if_ti.c index c5f3fc032ea2..9e8c8f1165e7 100644 --- a/sys/pci/if_ti.c +++ b/sys/pci/if_ti.c @@ -180,7 +180,6 @@ static struct ti_type ti_devs[] = { { 0, 0, NULL } }; -#define TI_CDEV_MAJOR 153 static d_open_t ti_open; static d_close_t ti_close; @@ -191,7 +190,6 @@ static struct cdevsw ti_cdevsw = { .d_close = ti_close, .d_ioctl = ti_ioctl2, .d_name = "ti", - .d_maj = TI_CDEV_MAJOR, }; static int ti_probe (device_t); |