Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/dec Don't use a callout unnecessarily - especially n...
details: https://anonhg.NetBSD.org/src/rev/472a9d92d3db
branches: trunk
changeset: 346375:472a9d92d3db
user: skrll <skrll%NetBSD.org@localhost>
date: Mon Jul 11 10:55:35 2016 +0000
description:
Don't use a callout unnecessarily - especially not this early
diffstat:
sys/dev/dec/lk201_ws.c | 22 ++++------------------
1 files changed, 4 insertions(+), 18 deletions(-)
diffs (57 lines):
diff -r 23ebbdb1e42b -r 472a9d92d3db sys/dev/dec/lk201_ws.c
--- a/sys/dev/dec/lk201_ws.c Mon Jul 11 10:47:52 2016 +0000
+++ b/sys/dev/dec/lk201_ws.c Mon Jul 11 10:55:35 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lk201_ws.c,v 1.9 2015/01/02 21:32:26 jklos Exp $ */
+/* $NetBSD: lk201_ws.c,v 1.10 2016/07/11 10:55:35 skrll Exp $ */
/*
* Copyright (c) 1998
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lk201_ws.c,v 1.9 2015/01/02 21:32:26 jklos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lk201_ws.c,v 1.10 2016/07/11 10:55:35 skrll Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -43,8 +43,6 @@
void lk201_identify(void *);
-static callout_t lkkbd_id;
-
static const char *lkkbd_descr[] = {
"no keyboard",
"LK-201 keyboard",
@@ -82,20 +80,6 @@
send(lks, LK_LED_ALL);
lks->leds_state = 0;
- callout_init(&lkkbd_id, 0);
- callout_setfunc(&lkkbd_id, lk201_identify, lks);
- callout_schedule(&lkkbd_id, 0);
-
- return (0);
-}
-
-void
-lk201_identify(void *v)
-{
- struct lk201_state *lks = v;
- int i;
-
- callout_destroy(&lkkbd_id);
/*
* Swallow all the keyboard acknowledges from lk201_init().
* There should be 14 of them - one per LK_CMD_MODE command.
@@ -133,6 +117,8 @@
lks->waitack = 0;
printf("lkkbd0: %s\n", lkkbd_descr[lks->kbdtype]);
+
+ return 0;
}
int
Home |
Main Index |
Thread Index |
Old Index