int comparam __P((struct tty *, struct termios *));
void comstart __P((struct tty *));
-struct cfdriver comcd = {
- NULL, "com", commatch, comattach, DV_TTY, sizeof(struct com_softc)
+struct cfattach com_ca = {
+ sizeof(struct com_softc), commatch, comattach
+};
+struct cfdriver com_cd = {
+ NULL, "com", DV_TTY, NULL, 0
};
int comdefaultrate = TTYDEF_SPEED;
int s;
int error = 0;
- if (unit >= comcd.cd_ndevs)
+ if (unit >= com_cd.cd_ndevs)
return ENXIO;
- sc = comcd.cd_devs[unit];
+ sc = com_cd.cd_devs[unit];
if (!sc)
return ENXIO;
struct proc *p;
{
int unit = COMUNIT(dev);
- struct com_softc *sc = comcd.cd_devs[unit];
+ struct com_softc *sc = com_cd.cd_devs[unit];
struct tty *tp = sc->sc_tty;
long iobase = sc->sc_iobase;
int s;
struct uio *uio;
int flag;
{
- struct com_softc *sc = comcd.cd_devs[COMUNIT(dev)];
+ struct com_softc *sc = com_cd.cd_devs[COMUNIT(dev)];
struct tty *tp = sc->sc_tty;
return ((*linesw[tp->t_line].l_read)(tp, uio, flag));
struct uio *uio;
int flag;
{
- struct com_softc *sc = comcd.cd_devs[COMUNIT(dev)];
+ struct com_softc *sc = com_cd.cd_devs[COMUNIT(dev)];
struct tty *tp = sc->sc_tty;
return ((*linesw[tp->t_line].l_write)(tp, uio, flag));
comtty(dev)
dev_t dev;
{
- struct com_softc *sc = comcd.cd_devs[COMUNIT(dev)];
+ struct com_softc *sc = com_cd.cd_devs[COMUNIT(dev)];
struct tty *tp = sc->sc_tty;
return (tp);
struct proc *p;
{
int unit = COMUNIT(dev);
- struct com_softc *sc = comcd.cd_devs[unit];
+ struct com_softc *sc = com_cd.cd_devs[unit];
struct tty *tp = sc->sc_tty;
long iobase = sc->sc_iobase;
int error;
struct tty *tp;
struct termios *t;
{
- struct com_softc *sc = comcd.cd_devs[COMUNIT(tp->t_dev)];
+ struct com_softc *sc = com_cd.cd_devs[COMUNIT(tp->t_dev)];
long iobase = sc->sc_iobase;
int ospeed = comspeed(t->c_ospeed);
u_char cfcr;
comstart(tp)
struct tty *tp;
{
- struct com_softc *sc = comcd.cd_devs[COMUNIT(tp->t_dev)];
+ struct com_softc *sc = com_cd.cd_devs[COMUNIT(tp->t_dev)];
long iobase = sc->sc_iobase;
int s;
comevents = 0;
splx(s);
- for (unit = 0; unit < comcd.cd_ndevs; unit++) {
- sc = comcd.cd_devs[unit];
+ for (unit = 0; unit < com_cd.cd_ndevs; unit++) {
+ sc = com_cd.cd_devs[unit];
if (sc == 0 || sc->sc_ibufp == sc->sc_ibuf)
continue;