Remove cdevsw_add() - the make_dev() calls are already there.
Don't '#if NSNP > 0' around the thing as it's silly and not required. config(8) only causes it to be compiled if NSNP is > 0 by definition.
This commit is contained in:
parent
7fb0a8412a
commit
e92f63a277
@ -16,9 +16,6 @@
|
||||
*/
|
||||
|
||||
#include "snp.h"
|
||||
|
||||
#if NSNP > 0
|
||||
|
||||
#include "opt_compat.h"
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -519,12 +516,8 @@ snp_drvinit(unused)
|
||||
{
|
||||
int i;
|
||||
|
||||
cdevsw_add(&snp_cdevsw);
|
||||
for ( i = 0 ; i < NSNP ; i++)
|
||||
for (i = 0; i < NSNP; i++)
|
||||
make_dev(&snp_cdevsw, i, 0, 0, 0600, "snp%d", i);
|
||||
}
|
||||
|
||||
SYSINIT(snpdev,SI_SUB_DRIVERS,SI_ORDER_MIDDLE+CDEV_MAJOR,snp_drvinit,NULL)
|
||||
|
||||
|
||||
#endif
|
||||
|
@ -16,9 +16,6 @@
|
||||
*/
|
||||
|
||||
#include "snp.h"
|
||||
|
||||
#if NSNP > 0
|
||||
|
||||
#include "opt_compat.h"
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -519,12 +516,8 @@ snp_drvinit(unused)
|
||||
{
|
||||
int i;
|
||||
|
||||
cdevsw_add(&snp_cdevsw);
|
||||
for ( i = 0 ; i < NSNP ; i++)
|
||||
for (i = 0; i < NSNP; i++)
|
||||
make_dev(&snp_cdevsw, i, 0, 0, 0600, "snp%d", i);
|
||||
}
|
||||
|
||||
SYSINIT(snpdev,SI_SUB_DRIVERS,SI_ORDER_MIDDLE+CDEV_MAJOR,snp_drvinit,NULL)
|
||||
|
||||
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user