1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-27 16:39:08 +00:00

- Add missing <sys/module.h>.

- s,pcf_,pcf_isa, to better reflect the purpose of this front-end and to
  avoid conflicts.
- Don't use this front-end for attaching to EBus, declaring it as an EBus
  driver was a cut&paste accident according to joerg.

OK'ed by:	joerg, nsouch
This commit is contained in:
Marius Strobl 2004-06-10 21:51:39 +00:00
parent f2ce1eaef9
commit cdd89aebf5
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=130318

View File

@ -39,6 +39,7 @@ __FBSDID("$FreeBSD$");
#include <sys/systm.h> #include <sys/systm.h>
#include <sys/bus.h> #include <sys/bus.h>
#include <sys/kernel.h> #include <sys/kernel.h>
#include <sys/module.h>
#include <sys/resource.h> #include <sys/resource.h>
#include <machine/bus.h> #include <machine/bus.h>
@ -55,17 +56,17 @@ __FBSDID("$FreeBSD$");
#define PCF_NAME "pcf" #define PCF_NAME "pcf"
static void pcf_identify(driver_t *, device_t); static void pcf_isa_identify(driver_t *, device_t);
static int pcf_probe(device_t); static int pcf_isa_probe(device_t);
static int pcf_attach(device_t); static int pcf_isa_attach(device_t);
static int pcf_detach(device_t); static int pcf_isa_detach(device_t);
static device_method_t pcf_methods[] = { static device_method_t pcf_isa_methods[] = {
/* device interface */ /* device interface */
DEVMETHOD(device_identify, pcf_identify), DEVMETHOD(device_identify, pcf_isa_identify),
DEVMETHOD(device_probe, pcf_probe), DEVMETHOD(device_probe, pcf_isa_probe),
DEVMETHOD(device_attach, pcf_attach), DEVMETHOD(device_attach, pcf_isa_attach),
DEVMETHOD(device_detach, pcf_detach), DEVMETHOD(device_detach, pcf_isa_detach),
/* iicbus interface */ /* iicbus interface */
DEVMETHOD(iicbus_callback, iicbus_null_callback), DEVMETHOD(iicbus_callback, iicbus_null_callback),
@ -78,16 +79,16 @@ static device_method_t pcf_methods[] = {
{ 0, 0 } { 0, 0 }
}; };
static devclass_t pcf_devclass; static devclass_t pcf_isa_devclass;
static driver_t pcf_driver = { static driver_t pcf_isa_driver = {
PCF_NAME, PCF_NAME,
pcf_methods, pcf_isa_methods,
sizeof(struct pcf_softc), sizeof(struct pcf_softc),
}; };
static void static void
pcf_identify(driver_t *driver, device_t parent) pcf_isa_identify(driver_t *driver, device_t parent)
{ {
BUS_ADD_CHILD(parent, ISA_ORDER_SPECULATIVE, PCF_NAME, 0); BUS_ADD_CHILD(parent, ISA_ORDER_SPECULATIVE, PCF_NAME, 0);
@ -95,7 +96,7 @@ pcf_identify(driver_t *driver, device_t parent)
} }
static int static int
pcf_probe(device_t dev) pcf_isa_probe(device_t dev)
{ {
u_long start, count; u_long start, count;
u_int rid = 0, port, error; u_int rid = 0, port, error;
@ -116,7 +117,7 @@ pcf_probe(device_t dev)
} }
static int static int
pcf_attach(device_t dev) pcf_isa_attach(device_t dev)
{ {
struct pcf_softc *sc; struct pcf_softc *sc;
int rv = ENXIO; int rv = ENXIO;
@ -181,7 +182,7 @@ pcf_attach(device_t dev)
} }
static int static int
pcf_detach(device_t dev) pcf_isa_detach(device_t dev)
{ {
struct pcf_softc *sc; struct pcf_softc *sc;
int rv; int rv;
@ -207,7 +208,6 @@ pcf_detach(device_t dev)
return (0); return (0);
} }
DRIVER_MODULE(pcf, ebus, pcf_driver, pcf_devclass, 0, 0); DRIVER_MODULE(pcf_isa, isa, pcf_isa_driver, pcf_isa_devclass, 0, 0);
DRIVER_MODULE(pcf, isa, pcf_driver, pcf_devclass, 0, 0); MODULE_DEPEND(pcf_isa, iicbus, PCF_MINVER, PCF_PREFVER, PCF_MAXVER);
MODULE_DEPEND(pcf, iicbus, PCF_MINVER, PCF_PREFVER, PCF_MAXVER); MODULE_VERSION(pcf_isa, PCF_MODVER);
MODULE_VERSION(pcf, PCF_MODVER);