Remove bogus cdevsw frobbing code which tries to prevent double
loading of modules. MODULE_VERSION() should be used for this I belive.
This commit is contained in:
parent
d0c90fe668
commit
3ad06fbb46
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=135614
@ -2411,23 +2411,10 @@ static int ng_cp_disconnect (hook_p hook)
|
||||
|
||||
static int cp_modevent (module_t mod, int type, void *unused)
|
||||
{
|
||||
struct cdev *dev;
|
||||
static int load_count = 0;
|
||||
struct cdevsw *cdsw;
|
||||
|
||||
#if __FreeBSD_version >= 502103
|
||||
dev = findcdev (makedev(CDEV_MAJOR, 0));
|
||||
#else
|
||||
dev = makedev (CDEV_MAJOR, 0);
|
||||
#endif
|
||||
switch (type) {
|
||||
case MOD_LOAD:
|
||||
if (dev != NULL &&
|
||||
(cdsw = devsw (dev)) &&
|
||||
cdsw->d_maj == CDEV_MAJOR) {
|
||||
printf ("Tau-PCI driver is already in system\n");
|
||||
return (ENXIO);
|
||||
}
|
||||
#if __FreeBSD_version >= 500000 && defined NETGRAPH
|
||||
if (ng_newtype (&typestruct))
|
||||
printf ("Failed to register ng_cp\n");
|
||||
|
@ -2338,23 +2338,10 @@ static int ng_ct_disconnect (hook_p hook)
|
||||
|
||||
static int ct_modevent (module_t mod, int type, void *unused)
|
||||
{
|
||||
struct cdev *dev;
|
||||
static int load_count = 0;
|
||||
struct cdevsw *cdsw;
|
||||
|
||||
#if __FreeBSD_version >= 502103
|
||||
dev = findcdev (makedev(CDEV_MAJOR, 0));
|
||||
#else
|
||||
dev = makedev (CDEV_MAJOR, 0);
|
||||
#endif
|
||||
switch (type) {
|
||||
case MOD_LOAD:
|
||||
if (dev != NULL &&
|
||||
(cdsw = devsw (dev)) &&
|
||||
cdsw->d_maj == CDEV_MAJOR) {
|
||||
printf ("Tau-ISA driver is already in system\n");
|
||||
return (ENXIO);
|
||||
}
|
||||
#if __FreeBSD_version >= 500000 && defined NETGRAPH
|
||||
if (ng_newtype (&typestruct))
|
||||
printf ("Failed to register ng_ct\n");
|
||||
|
@ -2789,23 +2789,10 @@ static int ng_cx_disconnect (hook_p hook)
|
||||
|
||||
static int cx_modevent (module_t mod, int type, void *unused)
|
||||
{
|
||||
struct cdev *dev;
|
||||
static int load_count = 0;
|
||||
struct cdevsw *cdsw;
|
||||
|
||||
#if __FreeBSD_version >= 502103
|
||||
dev = findcdev (makedev(CDEV_MAJOR, 0));
|
||||
#else
|
||||
dev = makedev (CDEV_MAJOR, 0);
|
||||
#endif
|
||||
switch (type) {
|
||||
case MOD_LOAD:
|
||||
if (dev != NULL &&
|
||||
(cdsw = devsw (dev)) &&
|
||||
cdsw->d_maj == CDEV_MAJOR) {
|
||||
printf ("Sigma driver is already in system\n");
|
||||
return (EEXIST);
|
||||
}
|
||||
#if __FreeBSD_version >= 500000 && defined NETGRAPH
|
||||
if (ng_newtype (&typestruct))
|
||||
printf ("Failed to register ng_cx\n");
|
||||
|
Loading…
Reference in New Issue
Block a user