summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2005-03-17 13:37:28 +0000
committerphk <phk@FreeBSD.org>2005-03-17 13:37:28 +0000
commitd9bafd24479a1aa44d8a31d49a8b78b79130fedc (patch)
tree18fe2c4d3f8bdfb0c74dab41e5411c7fd3be7b3c
parentcfa6bb09ea1f02e2fd37547ab40b7676048c034b (diff)
downloadFreeBSD-src-d9bafd24479a1aa44d8a31d49a8b78b79130fedc.zip
FreeBSD-src-d9bafd24479a1aa44d8a31d49a8b78b79130fedc.tar.gz
Kill MAJOR_AUTO
-rw-r--r--sys/dev/twa/twa.h2
-rw-r--r--sys/kern/kern_conf.c6
-rw-r--r--sys/sys/conf.h6
3 files changed, 3 insertions, 11 deletions
diff --git a/sys/dev/twa/twa.h b/sys/dev/twa/twa.h
index 59f9be8..452ba1b 100644
--- a/sys/dev/twa/twa.h
+++ b/sys/dev/twa/twa.h
@@ -37,8 +37,6 @@
#define TWA_DRIVER_VERSION_STRING "2.50.02.012"
-#define TWA_CDEV_MAJOR MAJOR_AUTO
-
#define TWA_REQUEST_TIMEOUT_PERIOD 60 /* seconds */
#define TWA_MESSAGE_SOURCE_CONTROLLER_ERROR 3
#define TWA_MESSAGE_SOURCE_CONTROLLER_EVENT 4
diff --git a/sys/kern/kern_conf.c b/sys/kern/kern_conf.c
index 884872c..b632711 100644
--- a/sys/kern/kern_conf.c
+++ b/sys/kern/kern_conf.c
@@ -334,10 +334,10 @@ find_major(struct cdevsw *devsw)
{
int i;
- if (devsw->d_maj != MAJOR_AUTO) {
+ if (devsw->d_maj != 0) {
printf("NOTICE: Ignoring d_maj hint from driver \"%s\", %s",
devsw->d_name, "driver should be updated/fixed\n");
- devsw->d_maj = MAJOR_AUTO;
+ devsw->d_maj = 0;
}
for (i = NUMCDEVSW - 1; i > 0; i--)
if (reserved_majors[i] != i)
@@ -353,7 +353,7 @@ fini_cdevsw(struct cdevsw *devsw)
{
if (devsw->d_flags & D_ALLOCMAJ) {
reserved_majors[devsw->d_maj] = 0;
- devsw->d_maj = MAJOR_AUTO;
+ devsw->d_maj = 0;
devsw->d_flags &= ~D_ALLOCMAJ;
}
devsw->d_flags &= ~D_INIT;
diff --git a/sys/sys/conf.h b/sys/sys/conf.h
index 6dc2561..f58ed4f 100644
--- a/sys/sys/conf.h
+++ b/sys/sys/conf.h
@@ -218,12 +218,6 @@ struct cdevsw {
#define MAXMINOR 0xffff00ffU
-/*
- * XXX: do not use MAJOR_AUTO unless you have no choice. In general drivers
- * should just not initialize .d_maj and that will DTRT.
- */
-#define MAJOR_AUTO 0 /* XXX: Not GM */
-
struct module;
struct devsw_module_data {
OpenPOWER on IntegriCloud