summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2004-02-21 19:42:58 +0000
committerphk <phk@FreeBSD.org>2004-02-21 19:42:58 +0000
commitdf397dedeab80f98300da9e5999d17a57c01b19f (patch)
treec4705f5f800de96d25d8356b2711c664dabcd41e /sys/dev
parentab77c85da2c48c6a8b74ed533d4b739b5afeb405 (diff)
downloadFreeBSD-src-df397dedeab80f98300da9e5999d17a57c01b19f.zip
FreeBSD-src-df397dedeab80f98300da9e5999d17a57c01b19f.tar.gz
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.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/acpica/acpi.c2
-rw-r--r--sys/dev/agp/agp.c2
-rw-r--r--sys/dev/atkbdc/psm.c2
-rw-r--r--sys/dev/bktr/bktr_os.c2
-rw-r--r--sys/dev/ciss/ciss.c2
-rw-r--r--sys/dev/cy/cy.c2
-rw-r--r--sys/dev/cy/cy_isa.c2
-rw-r--r--sys/dev/dcons/dcons.c2
-rw-r--r--sys/dev/digi/digi.c2
-rw-r--r--sys/dev/dpt/dpt.h1
-rw-r--r--sys/dev/drm/drm_drv.h1
-rw-r--r--sys/dev/drm/drm_os_freebsd.h1
-rw-r--r--sys/dev/fb/fb.c2
-rw-r--r--sys/dev/fdc/fdc.c2
-rw-r--r--sys/dev/firewire/fwdev.c2
-rw-r--r--sys/dev/iicbus/iic.c2
-rw-r--r--sys/dev/isp/isp_freebsd.c2
-rw-r--r--sys/dev/joy/joy.c2
-rw-r--r--sys/dev/kbd/kbd.c2
-rw-r--r--sys/dev/mcd/mcd.c2
-rw-r--r--sys/dev/mlx/mlx.c2
-rw-r--r--sys/dev/mly/mly.c2
-rw-r--r--sys/dev/mse/mse.c2
-rw-r--r--sys/dev/ofw/ofw_console.c4
-rw-r--r--sys/dev/ppbus/lpt.c2
-rw-r--r--sys/dev/ppbus/pcfclock.c2
-rw-r--r--sys/dev/ppbus/ppi.c2
-rw-r--r--sys/dev/ppbus/pps.c2
-rw-r--r--sys/dev/rc/rc.c2
-rw-r--r--sys/dev/rp/rp.c2
-rw-r--r--sys/dev/scd/scd.c2
-rw-r--r--sys/dev/si/si.c2
-rw-r--r--sys/dev/sio/sio.c2
-rw-r--r--sys/dev/smbus/smb.c2
-rw-r--r--sys/dev/speaker/spkr.c2
-rw-r--r--sys/dev/streams/streams.c2
-rw-r--r--sys/dev/syscons/sysmouse.c5
-rw-r--r--sys/dev/tdfx/tdfx_pci.c1
-rw-r--r--sys/dev/tdfx/tdfx_vars.h1
-rw-r--r--sys/dev/ti/if_ti.c2
-rw-r--r--sys/dev/twe/twe_freebsd.c1
-rw-r--r--sys/dev/twe/twevar.h2
-rw-r--r--sys/dev/usb/ucom.c2
-rw-r--r--sys/dev/usb/ufm.c7
-rw-r--r--sys/dev/usb/ugen.c2
-rw-r--r--sys/dev/usb/uhid.c2
-rw-r--r--sys/dev/usb/ulpt.c2
-rw-r--r--sys/dev/usb/ums.c2
-rw-r--r--sys/dev/usb/urio.c2
-rw-r--r--sys/dev/usb/usb.c1
-rw-r--r--sys/dev/usb/usbdi.h1
-rw-r--r--sys/dev/usb/uscanner.c2
52 files changed, 2 insertions, 104 deletions
diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c
index a92659a..3c7b038 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 2ae2b72..6f09660 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 4b12776..e886e8c 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 b074962..92c7fbe 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 e3deb35..843577d 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 203ed94..4351a30 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 203ed94..4351a30 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 6fd2844..04d7549 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 d366947..f1bc670 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 6b909a9..d04c95a 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 b6b8c61..e0dfbcc 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 43b6524..43f6309 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 c47bd12..5ce6708 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 5cc9408..5a50633 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 b3ecc8a..9a34ff9 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 d6410c7..0951f1f 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 2e70f53..e7526ab 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 9f6ff51..2ef286b 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 f4910e1..e7a67db 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 21c160e..285d57d 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 7c45024..bf9412c 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 48e8f25..6dacf27 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 408bbf7..b2c821b 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 a0e29ea..a4b5c8f 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 1914c95..687e7ad 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 35dce71..bf0a01d 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 bccccf8..c2783a6 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 08646bc..e7e1373 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 6817d02..f11537c 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 8e96f5b..98ae4a7 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 89850b3..d455e09 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 148182a..a3fd213 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 be51ac3..571265d 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 b7cfff9..280bda5 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 be3ad42..e82ef46 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 cc50c3b..8e5ac57 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 7384310..a7cff80 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 b57a596..dda1eb5 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 55bb060..67ce131 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 c5f3fc0..9e8c8f1 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 6f3f02b..6a3a8ff 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 63700da..e39c88e 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 e42657c..9298d08 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 7fcecfd..26916f1 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 8740c3d..408d14b 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 2451542..ec46474 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 6df5ff3..3dadd00 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 dea1e0b..4c0d598 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 6614a33..57979cd 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 4f9034a..6ff8ed3 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 146f8ca..b9e1c1e 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 7d83f57..ab46721 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
OpenPOWER on IntegriCloud