Avoid a '"fd" is usurping ...' message.
PR: 20348 Submitted by: Andre Albsmeier <andre.albsmeier@mchp.siemens.de>
This commit is contained in:
parent
0eb10a0963
commit
02211bae3b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=64453
@ -1101,10 +1101,14 @@ fd_attach(device_t dev)
|
||||
int typemynor;
|
||||
int typesize;
|
||||
#endif
|
||||
static int cdevsw_add_done = 0;
|
||||
|
||||
fd = device_get_softc(dev);
|
||||
|
||||
cdevsw_add(&fd_cdevsw); /* XXX */
|
||||
if (!cdevsw_add_done) {
|
||||
cdevsw_add(&fd_cdevsw); /* XXX */
|
||||
cdevsw_add_done++;
|
||||
}
|
||||
make_dev(&fd_cdevsw, (fd->fdu << 6),
|
||||
UID_ROOT, GID_OPERATOR, 0640, "rfd%d", fd->fdu);
|
||||
|
||||
|
@ -1101,10 +1101,14 @@ fd_attach(device_t dev)
|
||||
int typemynor;
|
||||
int typesize;
|
||||
#endif
|
||||
static int cdevsw_add_done = 0;
|
||||
|
||||
fd = device_get_softc(dev);
|
||||
|
||||
cdevsw_add(&fd_cdevsw); /* XXX */
|
||||
if (!cdevsw_add_done) {
|
||||
cdevsw_add(&fd_cdevsw); /* XXX */
|
||||
cdevsw_add_done++;
|
||||
}
|
||||
make_dev(&fd_cdevsw, (fd->fdu << 6),
|
||||
UID_ROOT, GID_OPERATOR, 0640, "rfd%d", fd->fdu);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user