summaryrefslogtreecommitdiffstats
path: root/sys/isa/syscons_isa.c
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2000-06-28 22:53:35 +0000
committerpeter <peter@FreeBSD.org>2000-06-28 22:53:35 +0000
commit8e0d1ee3c27437e6aebecf296f4df1494e89c2ac (patch)
tree0fd6a7bc165b34e04aba330c264b58dc5af29a60 /sys/isa/syscons_isa.c
parent033721fb7a75fd05ed0f793c8213356c46a8a9d1 (diff)
downloadFreeBSD-src-8e0d1ee3c27437e6aebecf296f4df1494e89c2ac.zip
FreeBSD-src-8e0d1ee3c27437e6aebecf296f4df1494e89c2ac.tar.gz
Add device_identify methods so that we do not need the
hint.sc.0.at=isa and hint.vga.0.at=isa hints in order for these to probe/attach.
Diffstat (limited to 'sys/isa/syscons_isa.c')
-rw-r--r--sys/isa/syscons_isa.c37
1 files changed, 20 insertions, 17 deletions
diff --git a/sys/isa/syscons_isa.c b/sys/isa/syscons_isa.c
index e65e984..0dfe03c 100644
--- a/sys/isa/syscons_isa.c
+++ b/sys/isa/syscons_isa.c
@@ -62,25 +62,14 @@
static devclass_t sc_devclass;
-static int scprobe(device_t dev);
-static int scattach(device_t dev);
-static int scresume(device_t dev);
-
-static device_method_t sc_methods[] = {
- DEVMETHOD(device_probe, scprobe),
- DEVMETHOD(device_attach, scattach),
- DEVMETHOD(device_resume, scresume),
- { 0, 0 }
-};
-
-static driver_t sc_driver = {
- SC_DRIVER_NAME,
- sc_methods,
- sizeof(sc_softc_t),
-};
-
static sc_softc_t main_softc;
+static void
+scidentify (driver_t *driver, device_t parent)
+{
+ BUS_ADD_CHILD(parent, ISA_ORDER_SPECULATIVE, "sc", 0);
+}
+
static int
scprobe(device_t dev)
{
@@ -242,4 +231,18 @@ sc_tone(int herz)
return 0;
}
+static device_method_t sc_methods[] = {
+ DEVMETHOD(device_identify, scidentify),
+ DEVMETHOD(device_probe, scprobe),
+ DEVMETHOD(device_attach, scattach),
+ DEVMETHOD(device_resume, scresume),
+ { 0, 0 }
+};
+
+static driver_t sc_driver = {
+ SC_DRIVER_NAME,
+ sc_methods,
+ sizeof(sc_softc_t),
+};
+
DRIVER_MODULE(sc, isa, sc_driver, sc_devclass, 0, 0);
OpenPOWER on IntegriCloud