Add an identify method to allow apm to attach itself to the nexus
without hooks in there.
This commit is contained in:
parent
cd8fd32d0d
commit
7fa76d3a80
@ -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"
|
||||
@ -799,6 +799,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
|
||||
*/
|
||||
@ -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),
|
||||
|
||||
|
@ -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"
|
||||
@ -799,6 +799,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
|
||||
*/
|
||||
@ -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),
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user