summaryrefslogtreecommitdiff
path: root/sys/arch/sun2/dev
diff options
context:
space:
mode:
authorjoerg <joerg@NetBSD.org>2007-10-18 18:54:56 +0000
committerjoerg <joerg@NetBSD.org>2007-10-18 18:54:56 +0000
commitd238692c3ed2a0b261d3f0ebcd262d0d545404c8 (patch)
treeeb3e0e92276c8ce9c225ba7f11d227255350ae63 /sys/arch/sun2/dev
parentbc89ba23ac92689206b04b822077f3920d360cb5 (diff)
Initialise the callbacks for tty.t_rstrt_ch in ttymalloc
as all drivers but Sun/SPARC's kd.c use the same arguments. Separate callout_reset into callout_schedule and the initial callout_setfunc using that.
Diffstat (limited to 'sys/arch/sun2/dev')
-rw-r--r--sys/arch/sun2/dev/kd.c8
-rw-r--r--sys/arch/sun2/dev/pcons.c6
2 files changed, 7 insertions, 7 deletions
diff --git a/sys/arch/sun2/dev/kd.c b/sys/arch/sun2/dev/kd.c
index f120d865d58..72dcb3402da 100644
--- a/sys/arch/sun2/dev/kd.c
+++ b/sys/arch/sun2/dev/kd.c
@@ -1,4 +1,4 @@
-/* $NetBSD: kd.c,v 1.16 2007/03/04 06:00:51 christos Exp $ */
+/* $NetBSD: kd.c,v 1.17 2007/10/18 18:54:59 joerg Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -46,7 +46,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kd.c,v 1.16 2007/03/04 06:00:51 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kd.c,v 1.17 2007/10/18 18:54:59 joerg Exp $");
#include <sys/param.h>
#include <sys/proc.h>
@@ -135,6 +135,7 @@ kd_init(struct kd_softc *kd)
kd = &kd_softc; /* XXX */
tp = ttymalloc();
+ callout_setfunc(&tp->t_rstrt_ch, kd_later, tp);
tp->t_oproc = kdstart;
tp->t_param = kdparam;
tp->t_dev = makedev(cdevsw_lookup_major(&kd_cdevsw), 0);
@@ -378,8 +379,7 @@ kdstart(struct tty *tp)
tp->t_state &= ~TS_BUSY;
} else {
/* called at interrupt level - do it later */
- callout_reset(&tp->t_rstrt_ch, 0,
- kd_later, tp);
+ callout_schedule(&tp->t_rstrt_ch, 0);
}
} else {
/*
diff --git a/sys/arch/sun2/dev/pcons.c b/sys/arch/sun2/dev/pcons.c
index 3cc0b286eed..ed95cb5aa97 100644
--- a/sys/arch/sun2/dev/pcons.c
+++ b/sys/arch/sun2/dev/pcons.c
@@ -1,4 +1,4 @@
-/* $NetBSD: pcons.c,v 1.15 2007/10/17 19:57:43 garbled Exp $ */
+/* $NetBSD: pcons.c,v 1.16 2007/10/18 18:54:59 joerg Exp $ */
/*-
* Copyright (c) 2000 Eduardo E. Horvath
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pcons.c,v 1.15 2007/10/17 19:57:43 garbled Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pcons.c,v 1.16 2007/10/18 18:54:59 joerg Exp $");
#include "opt_ddb.h"
@@ -239,7 +239,7 @@ pconsstart(struct tty *tp)
tp->t_state &= ~TS_BUSY;
if (cl->c_cc) {
tp->t_state |= TS_TIMEOUT;
- callout_reset(&tp->t_rstrt_ch, 1, ttrstrt, (void *)tp);
+ callout_schedule(&tp->t_rstrt_ch, 1);
}
if (cl->c_cc <= tp->t_lowat) {
if (tp->t_state & TS_ASLEEP) {