summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2005-10-16 20:22:56 +0000
committerphk <phk@FreeBSD.org>2005-10-16 20:22:56 +0000
commit2853ff590d956b1bb6b15c5543758e76d69c823c (patch)
tree136df2f5eb3978a913bbef50def66e4c0eb9606d
parent643ec6468f745d42570f07a6873d4eeffe51baa6 (diff)
downloadFreeBSD-src-2853ff590d956b1bb6b15c5543758e76d69c823c.zip
FreeBSD-src-2853ff590d956b1bb6b15c5543758e76d69c823c.tar.gz
Eliminate two unused arguments to ttycreate().
-rw-r--r--sys/dev/cx/if_cx.c3
-rw-r--r--sys/dev/cy/cy.c2
-rw-r--r--sys/dev/digi/digi.c2
-rw-r--r--sys/dev/rc/rc.c2
-rw-r--r--sys/dev/rp/rp.c2
-rw-r--r--sys/dev/sab/sab.c2
-rw-r--r--sys/dev/si/si.c2
-rw-r--r--sys/dev/sio/sio.c2
-rw-r--r--sys/dev/uart/uart_tty.c2
-rw-r--r--sys/dev/usb/ubser.c2
-rw-r--r--sys/dev/usb/ucom.c2
-rw-r--r--sys/dev/usb/ucycom.c2
-rw-r--r--sys/kern/tty.c6
-rw-r--r--sys/pc98/cbus/sio.c2
-rw-r--r--sys/sys/tty.h3
15 files changed, 19 insertions, 17 deletions
diff --git a/sys/dev/cx/if_cx.c b/sys/dev/cx/if_cx.c
index 8cf2912..c6ebc3b 100644
--- a/sys/dev/cx/if_cx.c
+++ b/sys/dev/cx/if_cx.c
@@ -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,
diff --git a/sys/dev/cy/cy.c b/sys/dev/cy/cy.c
index d6fe330..75acea5 100644
--- a/sys/dev/cy/cy.c
+++ b/sys/dev/cy/cy.c
@@ -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);
}
}
diff --git a/sys/dev/digi/digi.c b/sys/dev/digi/digi.c
index 5635b4e..b30542e 100644
--- a/sys/dev/digi/digi.c
+++ b/sys/dev/digi/digi.c
@@ -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);
diff --git a/sys/dev/rc/rc.c b/sys/dev/rc/rc.c
index 071dbc7..d8a8259 100644
--- a/sys/dev/rc/rc.c
+++ b/sys/dev/rc/rc.c
@@ -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,
diff --git a/sys/dev/rp/rp.c b/sys/dev/rp/rp.c
index e336bca..c2e8a64 100644
--- a/sys/dev/rp/rp.c
+++ b/sys/dev/rp/rp.c
@@ -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);
}
}
diff --git a/sys/dev/sab/sab.c b/sys/dev/sab/sab.c
index a41d328..1fcd8fe 100644
--- a/sys/dev/sab/sab.c
+++ b/sys/dev/sab/sab.c
@@ -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,
diff --git a/sys/dev/si/si.c b/sys/dev/si/si.c
index 2f9f872..8bbb8b8 100644
--- a/sys/dev/si/si.c
+++ b/sys/dev/si/si.c
@@ -552,7 +552,7 @@ try_next:
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) {
diff --git a/sys/dev/sio/sio.c b/sys/dev/sio/sio.c
index f09af58..ddfd9e9 100644
--- a/sys/dev/sio/sio.c
+++ b/sys/dev/sio/sio.c
@@ -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);
}
diff --git a/sys/dev/uart/uart_tty.c b/sys/dev/uart/uart_tty.c
index 6eb573b..a2219c6 100644
--- a/sys/dev/uart/uart_tty.c
+++ b/sys/dev/uart/uart_tty.c
@@ -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);
}
diff --git a/sys/dev/usb/ubser.c b/sys/dev/usb/ubser.c
index 8158f47..0d17a58 100644
--- a/sys/dev/usb/ubser.c
+++ b/sys/dev/usb/ubser.c
@@ -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);
}
diff --git a/sys/dev/usb/ucom.c b/sys/dev/usb/ucom.c
index 0260cb6..9d028f7 100644
--- a/sys/dev/usb/ucom.c
+++ b/sys/dev/usb/ucom.c
@@ -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);
diff --git a/sys/dev/usb/ucycom.c b/sys/dev/usb/ucycom.c
index 2c32a80..9d6dee7 100644
--- a/sys/dev/usb/ucycom.c
+++ b/sys/dev/usb/ucycom.c
@@ -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);
}
diff --git a/sys/kern/tty.c b/sys/kern/tty.c
index 6263432..62e3028 100644
--- a/sys/kern/tty.c
+++ b/sys/kern/tty.c
@@ -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);
diff --git a/sys/pc98/cbus/sio.c b/sys/pc98/cbus/sio.c
index f8b5181..b3638d7 100644
--- a/sys/pc98/cbus/sio.c
+++ b/sys/pc98/cbus/sio.c
@@ -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);
}
diff --git a/sys/sys/tty.h b/sys/sys/tty.h
index d9f104a..ccfd350 100644
--- a/sys/sys/tty.h
+++ b/sys/sys/tty.h
@@ -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);
OpenPOWER on IntegriCloud