From df397dedeab80f98300da9e5999d17a57c01b19f Mon Sep 17 00:00:00 2001 From: phk Date: Sat, 21 Feb 2004 19:42:58 +0000 Subject: 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. --- sys/i386/isa/asc.c | 2 -- sys/i386/isa/ctx.c | 2 -- sys/i386/isa/cy.c | 2 -- sys/i386/isa/gpib.c | 2 -- sys/i386/isa/gsc.c | 2 -- sys/i386/isa/istallion.c | 2 -- sys/i386/isa/mse.c | 2 -- sys/i386/isa/pcvt/pcvt_drv.c | 2 -- sys/i386/isa/spic.c | 1 - sys/i386/isa/spicreg.h | 1 - sys/i386/isa/spigot.c | 2 -- sys/i386/isa/spkr.c | 2 -- sys/i386/isa/stallion.c | 2 -- sys/i386/isa/wt.c | 2 -- 14 files changed, 26 deletions(-) (limited to 'sys/i386/isa') diff --git a/sys/i386/isa/asc.c b/sys/i386/isa/asc.c index 23a9801..8aff8c1 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 db26c40..28adedc 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 203ed94..4351a30 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 26102df..480448a 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 a59f493..d4dff76 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 7f27ad7..e44400d 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 408bbf7..b2c821b 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 38c1ced..3510480 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 93985e4..e73b8b6 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 62a12ab..7657f3e 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 0b568f3..dd23abd 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 be3ad42..e82ef46 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 54d186d..4665491 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 22257f7..941fc08 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, }; -- cgit v1.1