Unbreak after previous commit. While here, improve function naming

consistency by s/ssc/ssc_/g.
This commit is contained in:
marcel 2006-05-27 17:52:08 +00:00
parent 0dff310c2e
commit efa2062722

View File

@ -53,26 +53,26 @@
#define SSC_POLL_HZ 50
static d_open_t sscopen;
static d_close_t sscclose;
static d_open_t ssc_open;
static d_close_t ssc_close;
static struct cdevsw ssc_cdevsw = {
.d_version = D_VERSION,
.d_open = sscopen,
.d_close = sscclose,
.d_open = ssc_open,
.d_close = ssc_close,
.d_name = "ssc",
.d_flags = D_TTY | D_NEEDGIANT,
};
static struct tty *ssc_tp = NULL;
static int polltime;
static struct callout_handle ssctimeouthandle
= CALLOUT_HANDLE_INITIALIZER(&ssctimeouthandle);
static struct callout_handle ssc_timeouthandle
= CALLOUT_HANDLE_INITIALIZER(&ssc_timeouthandle);
static void sscstart(struct tty *);
static void ssctimeout(void *);
static int sscparam(struct tty *, struct termios *);
static void sscstop(struct tty *, int);
static void ssc_start(struct tty *);
static void ssc_timeout(void *);
static int ssc_param(struct tty *, struct termios *);
static void ssc_stop(struct tty *, int);
static u_int64_t
ssc(u_int64_t in0, u_int64_t in1, u_int64_t in2, u_int64_t in3, int which)
@ -104,13 +104,13 @@ ssc_cnterm(struct consdev *cp)
}
static void
ssccnattach(void *arg)
ssc_cnattach(void *arg)
{
make_dev(&ssc_cdevsw, 0, UID_ROOT, GID_WHEEL, 0600, "ssccons");
ssc_tp = ttyalloc();
}
SYSINIT(ssccnattach, SI_SUB_DRIVERS, SI_ORDER_ANY, ssccnattach, 0);
SYSINIT(ssc_cnattach, SI_SUB_DRIVERS, SI_ORDER_ANY, ssc_cnattach, 0);
static void
ssc_cnputc(struct consdev *cp, int c)
@ -129,7 +129,7 @@ ssc_cngetc(struct consdev *cp)
}
static int
sscopen(struct cdev *dev, int flag, int mode, struct thread *td)
ssc_open(struct cdev *dev, int flag, int mode, struct thread *td)
{
struct tty *tp;
int s;
@ -138,9 +138,9 @@ sscopen(struct cdev *dev, int flag, int mode, struct thread *td)
tp = dev->si_tty = ssc_tp;
s = spltty();
tp->t_oproc = sscstart;
tp->t_param = sscparam;
tp->t_stop = sscstop;
tp->t_oproc = ssc_start;
tp->t_param = ssc_param;
tp->t_stop = ssc_stop;
tp->t_dev = dev;
if ((tp->t_state & TS_ISOPEN) == 0) {
tp->t_state |= TS_CARR_ON;
@ -160,13 +160,13 @@ sscopen(struct cdev *dev, int flag, int mode, struct thread *td)
polltime = hz / SSC_POLL_HZ;
if (polltime < 1)
polltime = 1;
ssctimeouthandle = timeout(ssctimeout, tp, polltime);
ssc_timeouthandle = timeout(ssc_timeout, tp, polltime);
}
return error;
}
static int
sscclose(struct cdev *dev, int flag, int mode, struct thread *td)
ssc_close(struct cdev *dev, int flag, int mode, struct thread *td)
{
int unit = minor(dev);
struct tty *tp = ssc_tp;
@ -174,21 +174,21 @@ sscclose(struct cdev *dev, int flag, int mode, struct thread *td)
if (unit != 0)
return ENXIO;
untimeout(ssctimeout, tp, ssctimeouthandle);
untimeout(ssc_timeout, tp, ssc_timeouthandle);
ttyld_close(tp, flag);
tty_close(tp);
return 0;
}
static int
sscparam(struct tty *tp, struct termios *t)
ssc_param(struct tty *tp, struct termios *t)
{
return 0;
}
static void
sscstart(struct tty *tp)
ssc_start(struct tty *tp)
{
int s;
@ -202,7 +202,7 @@ sscstart(struct tty *tp)
tp->t_state |= TS_BUSY;
while (tp->t_outq.c_cc != 0)
ssccnputc(NULL, getc(&tp->t_outq));
ssc_cnputc(NULL, getc(&tp->t_outq));
tp->t_state &= ~TS_BUSY;
ttwwakeup(tp);
@ -213,7 +213,7 @@ sscstart(struct tty *tp)
* Stop output on a line.
*/
static void
sscstop(struct tty *tp, int flag)
ssc_stop(struct tty *tp, int flag)
{
int s;
@ -225,16 +225,16 @@ sscstop(struct tty *tp, int flag)
}
static void
ssctimeout(void *v)
ssc_timeout(void *v)
{
struct tty *tp = v;
int c;
while ((c = ssccncheckc(NULL)) != -1) {
while ((c = ssc_cngetc(NULL)) != -1) {
if (tp->t_state & TS_ISOPEN)
ttyld_rint(tp, c);
}
ssctimeouthandle = timeout(ssctimeout, tp, polltime);
ssc_timeouthandle = timeout(ssc_timeout, tp, polltime);
}
CONSOLE_DRIVER(ssc);