1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-27 16:39:08 +00:00

Eliminate two unused arguments to ttycreate().

This commit is contained in:
Poul-Henning Kamp 2005-10-16 20:22:56 +00:00
parent a9c76d92d2
commit 733634738e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=151383
15 changed files with 19 additions and 17 deletions

View File

@ -898,8 +898,7 @@ static int cx_attach (device_t dev)
cx_register_modem (c, &cx_modem);
CX_UNLOCK (bd);
ttycreate(d->tty, NULL, 0, MINOR_CALLOUT,
"x%r%r", b->num, c->num);
ttycreate(d->tty, TS_CALLOUT, "x%r%r", b->num, c->num);
d->devt = make_dev (&cx_cdevsw, b->num*NCHAN + c->num + 64, UID_ROOT, GID_WHEEL, 0600, "cx%d", b->num*NCHAN + c->num);
d->devt->si_drv1 = d;
callout_init (&d->dcd_timeout_handle,

View File

@ -433,7 +433,7 @@ cyattach_common(cy_addr cy_iobase, int cy_align)
swi_add(&clk_ithd, "cy", cypoll, NULL, SWI_CLOCK, 0,
&cy_slow_ih);
}
ttycreate(tp, NULL, 0, MINOR_CALLOUT, "c%r%r",
ttycreate(tp, TS_CALLOUT, "c%r%r",
adapter, unit % CY_MAX_PORTS);
}
}

View File

@ -588,7 +588,7 @@ digi_init(struct digi_softc *sc)
ttyinitmode(tp, 0, 0);
port->send_ring = 1; /* Default action on signal RI */
ttycreate(tp, NULL, 0, MINOR_CALLOUT, "D%r%r", sc->res.unit, i);
ttycreate(tp, TS_CALLOUT, "D%r%r", sc->res.unit, i);
}
sc->hidewin(sc);

View File

@ -301,7 +301,7 @@ rc_attach(device_t dev)
tp->t_break = rc_break;
tp->t_close = rc_close;
tp->t_stop = rc_stop;
ttycreate(tp, NULL, 0, MINOR_CALLOUT, "m%d", chan + base);
ttycreate(tp, TS_CALLOUT, "m%d", chan + base);
}
error = bus_setup_intr(dev, sc->sc_irq, INTR_TYPE_TTY, rc_intr, sc,

View File

@ -826,7 +826,7 @@ rp_attachcommon(CONTROLLER_T *ctlp, int num_aiops, int num_ports)
rp->rp_cts = (ChanStatus & CTS_ACT) != 0;
line = (unit << 5) | (aiop << 3) | chan;
rp_table(line) = rp;
ttycreate(tp, NULL, 0, MINOR_CALLOUT, "R%r", port);
ttycreate(tp, TS_CALLOUT, "R%r", port);
}
}

View File

@ -453,7 +453,7 @@ sabtty_attach(device_t dev)
tp->t_stop = sabttystop;
tp->t_open = sabttyopen;
ttycreate(tp, NULL, 0, 0, "z%r", device_get_unit(dev));
ttycreate(tp, 0, "z%r", device_get_unit(dev));
if (sabtty_console(dev, mode, sizeof(mode))) {
if (sscanf(mode, "%d,%d,%c,%d,%c", &baud, &clen, &parity,

View File

@ -552,7 +552,7 @@ siattach(device_t dev)
tp->t_oproc = si_start;
tp->t_param = siparam;
tp->t_stop = si_stop;
ttycreate(tp, NULL, 0, MINOR_CALLOUT, "A%r%r", unit, x);
ttycreate(tp, TS_CALLOUT, "A%r%r", unit, x);
}
try_next2:
if (modp->sm_next == 0) {

View File

@ -1099,7 +1099,7 @@ determined_type: ;
}
/* We're ready, open the doors... */
ttycreate(tp, NULL, unit, MINOR_CALLOUT, "d%r", unit);
ttycreate(tp, TS_CALLOUT, "d%r", unit);
return (0);
}

View File

@ -380,7 +380,7 @@ uart_tty_attach(struct uart_softc *sc)
swi_add(&tty_ithd, uart_driver_name, uart_tty_intr, sc, SWI_TTY,
INTR_TYPE_TTY, &sc->sc_softih);
ttycreate(tp, NULL, 0, MINOR_CALLOUT, "u%r", unit);
ttycreate(tp, TS_CALLOUT, "u%r", unit);
return (0);
}

View File

@ -353,7 +353,7 @@ USB_ATTACH(ubser)
tp->t_open = ubseropen;
tp->t_close = ubserclose;
tp->t_modem = ubsermodem;
ttycreate(tp, NULL, 0, 0, "y%r%r", USBDEVUNIT(sc->sc_dev), i);
ttycreate(tp, 0, "y%r%r", USBDEVUNIT(sc->sc_dev), i);
}

View File

@ -168,7 +168,7 @@ ucom_attach(struct ucom_softc *sc)
DPRINTF(("ucom_attach: tty_attach tp = %p\n", tp));
ttycreate(tp, NULL, unit, MINOR_CALLOUT, "U%d", unit);
ttycreate(tp, TS_CALLOUT, "U%d", unit);
DPRINTF(("ucom_attach: ttycreate: ttyU%d\n", unit));
return (0);

View File

@ -284,7 +284,7 @@ ucycom_attach(device_t dev)
"output bytes");
/* create character device node */
ttycreate(sc->sc_tty, NULL, 0, 0, "y%r", device_get_unit(sc->sc_dev));
ttycreate(sc->sc_tty, 0, "y%r", device_get_unit(sc->sc_dev));
return (0);
}

View File

@ -2900,9 +2900,11 @@ ttypurge(struct cdev *dev)
*/
int
ttycreate(struct tty *tp, struct cdevsw *csw, int unit, int flags, const char *fmt, ...)
ttycreate(struct tty *tp, int flags, const char *fmt, ...)
{
char namebuf[SPECNAMELEN - 3]; /* XXX space for "tty" */
struct cdevsw *csw = NULL;
int unit = 0;
va_list ap;
struct cdev *cp;
int i, minor, sminor, sunit;
@ -2952,7 +2954,7 @@ ttycreate(struct tty *tp, struct cdevsw *csw, int unit, int flags, const char *f
cp->si_drv2 = &tp->t_lock_in;
cp->si_tty = tp;
if (flags & MINOR_CALLOUT) {
if (flags & TS_CALLOUT) {
cp = make_dev(csw, minor | MINOR_CALLOUT,
UID_UUCP, GID_DIALER, 0660, "cua%s", namebuf);
dev_depends(tp->t_dev, cp);

View File

@ -1762,7 +1762,7 @@ determined_type: ;
}
/* We're ready, open the doors... */
ttycreate(tp, NULL, unit, MINOR_CALLOUT, "d%r", unit);
ttycreate(tp, TS_CALLOUT, "d%r", unit);
return (0);
}

View File

@ -253,6 +253,7 @@ struct xtty {
#define TS_DTR_WAIT 0x1000000 /* DTR hold-down between sessions */
#define TS_GONE 0x2000000 /* Hardware detached */
#define TS_CALLOUT 0x4000000 /* Callout devices */
/* Character type information. */
#define ORDINARY 0
@ -350,7 +351,7 @@ void ttychars(struct tty *tp);
int ttycheckoutq(struct tty *tp, int wait);
void ttyconsolemode(struct tty *tp, int speed);
int tty_close(struct tty *tp);
int ttycreate(struct tty *tp, struct cdevsw *, int unit, int flags, const char *fmt, ...) __printflike(5, 6);
int ttycreate(struct tty *tp, int flags, const char *fmt, ...) __printflike(3, 4);
int ttydtrwaitsleep(struct tty *tp);
void ttydtrwaitstart(struct tty *tp);
void ttyflush(struct tty *tp, int rw);