summaryrefslogtreecommitdiffstats
path: root/sys/isa/vga_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/vga_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/vga_isa.c')
-rw-r--r--sys/isa/vga_isa.c42
1 files changed, 23 insertions, 19 deletions
diff --git a/sys/isa/vga_isa.c b/sys/isa/vga_isa.c
index 4ebb65e..57f934e 100644
--- a/sys/isa/vga_isa.c
+++ b/sys/isa/vga_isa.c
@@ -59,25 +59,6 @@
static devclass_t isavga_devclass;
-static int isavga_probe(device_t dev);
-static int isavga_attach(device_t dev);
-
-static device_method_t isavga_methods[] = {
- DEVMETHOD(device_probe, isavga_probe),
- DEVMETHOD(device_attach, isavga_attach),
-
- DEVMETHOD(bus_print_child, bus_generic_print_child),
- { 0, 0 }
-};
-
-static driver_t isavga_driver = {
- VGA_DRIVER_NAME,
- isavga_methods,
- sizeof(vga_softc_t),
-};
-
-DRIVER_MODULE(vga, isa, isavga_driver, isavga_devclass, 0, 0);
-
#ifdef FB_INSTALL_CDEV
static d_open_t isavga_open;
@@ -106,6 +87,12 @@ static struct cdevsw isavga_cdevsw = {
#endif /* FB_INSTALL_CDEV */
+static void
+isavga_identify(driver_t *driver, device_t parent)
+{
+ BUS_ADD_CHILD(parent, ISA_ORDER_SPECULATIVE, VGA_DRIVER_NAME, 0);
+}
+
static int
isavga_probe(device_t dev)
{
@@ -216,3 +203,20 @@ isavga_mmap(dev_t dev, vm_offset_t offset, int prot)
}
#endif /* FB_INSTALL_CDEV */
+
+static device_method_t isavga_methods[] = {
+ DEVMETHOD(device_identify, isavga_identify),
+ DEVMETHOD(device_probe, isavga_probe),
+ DEVMETHOD(device_attach, isavga_attach),
+
+ DEVMETHOD(bus_print_child, bus_generic_print_child),
+ { 0, 0 }
+};
+
+static driver_t isavga_driver = {
+ VGA_DRIVER_NAME,
+ isavga_methods,
+ sizeof(vga_softc_t),
+};
+
+DRIVER_MODULE(vga, isa, isavga_driver, isavga_devclass, 0, 0);
OpenPOWER on IntegriCloud