mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-17 13:53:39 +00:00
Kill MAJOR_AUTO
This commit is contained in:
parent
800b42bde0
commit
bde1a9c98b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=143748
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue