summaryrefslogtreecommitdiffstats
path: root/sys/i386/apm
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1999-08-22 19:51:33 +0000
committerpeter <peter@FreeBSD.org>1999-08-22 19:51:33 +0000
commita9f73d3ac89b95948d78d483804ebe2f1bc88359 (patch)
treede2644619d8ce914ba89b9373e4b16bacab23cda /sys/i386/apm
parent914b2cf9882e61d56c0e473391940c541a1323dd (diff)
downloadFreeBSD-src-a9f73d3ac89b95948d78d483804ebe2f1bc88359.zip
FreeBSD-src-a9f73d3ac89b95948d78d483804ebe2f1bc88359.tar.gz
Add an identify method to allow apm to attach itself to the nexus
without hooks in there.
Diffstat (limited to 'sys/i386/apm')
-rw-r--r--sys/i386/apm/apm.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/sys/i386/apm/apm.c b/sys/i386/apm/apm.c
index 3bbf7b4..69c5692 100644
--- a/sys/i386/apm/apm.c
+++ b/sys/i386/apm/apm.c
@@ -15,7 +15,7 @@
*
* Sep, 1994 Implemented on FreeBSD 1.1.5.1R (Toshiba AVS001WD)
*
- * $Id: apm.c,v 1.100 1999/08/21 06:24:11 msmith Exp $
+ * $Id: apm.c,v 1.101 1999/08/22 14:48:00 iwasaki Exp $
*/
#include "opt_devfs.h"
@@ -800,6 +800,19 @@ apm_not_halt_cpu(void)
/* device driver definitions */
/*
+ * Create "connection point"
+ */
+static void
+apm_identify(driver_t *driver, device_t parent)
+{
+ device_t child;
+
+ child = BUS_ADD_CHILD(parent, 0, "apm", 0);
+ if (child == NULL)
+ panic("apm_identify");
+}
+
+/*
* probe for APM BIOS
*/
static int
@@ -1363,6 +1376,7 @@ apmpoll(dev_t dev, int events, struct proc *p)
static device_method_t apm_methods[] = {
/* Device interface */
+ DEVMETHOD(device_identify, apm_identify),
DEVMETHOD(device_probe, apm_probe),
DEVMETHOD(device_attach, apm_attach),
OpenPOWER on IntegriCloud