|
NAME
SYNOPSIS#include <sys/param.h>
#include <sys/kernel.h>
#include <sys/bus.h>
#include <sys/module.h>
static int foo_probe(device_t);
static int foo_attach(device_t);
static int foo_detach(device_t);
static int foo_frob(device_t, int, int);
static int foo_twiddle(device_t, char *);
static device_method_t foo_methods[] = {
/* Methods from the device interface */
DEVMETHOD(device_probe, foo_probe),
DEVMETHOD(device_attach, foo_attach),
DEVMETHOD(device_detach, foo_detach),
/* Methods from the bogo interface */
DEVMETHOD(bogo_frob, foo_frob),
DEVMETHOD(bogo_twiddle, foo_twiddle),
/* Terminate method list */
DEVMETHOD_END
};
static driver_t foo_driver = {
"foo",
foo_methods,
sizeof(struct foo_softc)
};
DRIVER_MODULE(foo, bogo, foo_driver, NULL, NULL);
DESCRIPTIONEach driver in the kernel is described by a
When a driver is registered with the system (by the
SEE ALSOdevclass(9), device(9), DEVICE_ATTACH(9), DEVICE_DETACH(9), DEVICE_IDENTIFY(9), DEVICE_PROBE(9), DEVICE_SHUTDOWN(9), DRIVER_MODULE(9) HISTORYThe AUTHORSThis manual page was written by Doug Rabson.
|