Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/sun Make it compilable without envsys
details: https://anonhg.NetBSD.org/src/rev/698d095d439a
branches: trunk
changeset: 779038:698d095d439a
user: martin <martin%NetBSD.org@localhost>
date: Fri Apr 27 09:30:13 2012 +0000
description:
Make it compilable without envsys
diffstat:
sys/dev/sun/kbd.c | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
diffs (78 lines):
diff -r 24216706cc62 -r 698d095d439a sys/dev/sun/kbd.c
--- a/sys/dev/sun/kbd.c Fri Apr 27 06:30:48 2012 +0000
+++ b/sys/dev/sun/kbd.c Fri Apr 27 09:30:13 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kbd.c,v 1.64 2012/04/26 00:50:10 macallan Exp $ */
+/* $NetBSD: kbd.c,v 1.65 2012/04/27 09:30:13 martin Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -47,7 +47,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kbd.c,v 1.64 2012/04/26 00:50:10 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kbd.c,v 1.65 2012/04/27 09:30:13 martin Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -79,6 +79,7 @@
#include "ioconf.h"
#include "locators.h"
#include "opt_sunkbd.h"
+#include "sysmon_envsys.h"
dev_type_open(kbdopen);
dev_type_close(kbdclose);
@@ -153,7 +154,9 @@
/* firm events input */
static void kbd_input_event(struct kbd_softc *, int);
+#if NSYSMON_ENVSYS
static void kbd_powerbutton(void *);
+#endif
/****************************************************************
* Entry points for /dev/kbd
@@ -927,11 +930,13 @@
return;
#endif
case 0x30:
+#if NSYSMON_ENVSYS
if (k->k_isconsole)
k->k_ev = KEY_UP(code) ?
PSWITCH_EVENT_RELEASED :
PSWITCH_EVENT_PRESSED;
sysmon_task_queue_sched(0, kbd_powerbutton, k);
+#endif
return;
}
}
@@ -1074,6 +1079,7 @@
{
k->k_isconsole = isconsole;
if (isconsole) {
+#if NSYSMON_ENVSYS
sysmon_task_queue_init();
memset(&k->k_sm_pbutton, 0, sizeof(struct sysmon_pswitch));
k->k_sm_pbutton.smpsw_name = device_xname(k->k_dev);
@@ -1081,10 +1087,12 @@
if (sysmon_pswitch_register(&k->k_sm_pbutton) != 0)
aprint_error_dev(k->k_dev,
"unable to register power button with sysmon\n");
+#endif
}
config_interrupts(k->k_dev, kbd_enable);
}
+#if NSYSMON_ENVSYS
static void
kbd_powerbutton(void *cookie)
{
@@ -1092,5 +1100,6 @@
sysmon_pswitch_event(&k->k_sm_pbutton, k->k_ev);
}
+#endif
#endif
Home |
Main Index |
Thread Index |
Old Index