diff --git a/sys/dev/rc/rc.c b/sys/dev/rc/rc.c index 8e0fdc584122..78b94f201b22 100644 --- a/sys/dev/rc/rc.c +++ b/sys/dev/rc/rc.c @@ -33,7 +33,6 @@ #include "rc.h" #if NRC > 0 - #include "opt_devfs.h" /*#define RCDEBUG*/ @@ -59,7 +58,6 @@ #include #include - /* Prototypes */ static int rcprobe __P((struct isa_device *)); static int rcattach __P((struct isa_device *)); @@ -213,10 +211,6 @@ rcprobe(dvp) { int irq = ffs(dvp->id_irq) - 1; register int nec = dvp->id_iobase; - static int once; - - if (!once++) - cdevsw_add(&rc_cdevsw); if (dvp->id_unit > NRC) return 0; @@ -291,9 +285,10 @@ rcattach(dvp) } rcb->rcb_probed = RC_ATTACHED; if (!rc_started) { + cdevsw_add(&rc_cdevsw); register_swi(SWI_TTY, rcpoll); rc_wakeup((void *)NULL); - rc_started = 0; + rc_started = 1; } return 1; } diff --git a/sys/i386/isa/rc.c b/sys/i386/isa/rc.c index 8e0fdc584122..78b94f201b22 100644 --- a/sys/i386/isa/rc.c +++ b/sys/i386/isa/rc.c @@ -33,7 +33,6 @@ #include "rc.h" #if NRC > 0 - #include "opt_devfs.h" /*#define RCDEBUG*/ @@ -59,7 +58,6 @@ #include #include - /* Prototypes */ static int rcprobe __P((struct isa_device *)); static int rcattach __P((struct isa_device *)); @@ -213,10 +211,6 @@ rcprobe(dvp) { int irq = ffs(dvp->id_irq) - 1; register int nec = dvp->id_iobase; - static int once; - - if (!once++) - cdevsw_add(&rc_cdevsw); if (dvp->id_unit > NRC) return 0; @@ -291,9 +285,10 @@ rcattach(dvp) } rcb->rcb_probed = RC_ATTACHED; if (!rc_started) { + cdevsw_add(&rc_cdevsw); register_swi(SWI_TTY, rcpoll); rc_wakeup((void *)NULL); - rc_started = 0; + rc_started = 1; } return 1; }