summaryrefslogtreecommitdiffstats
path: root/sys/pc98/cbus/gdc.c
diff options
context:
space:
mode:
authornyan <nyan@FreeBSD.org>2000-07-11 12:50:34 +0000
committernyan <nyan@FreeBSD.org>2000-07-11 12:50:34 +0000
commitb5738d479e0eaad924b34c5d0b2d67227187006f (patch)
treecc0ed6121e6e56a5498b37cea5f448af592d36c6 /sys/pc98/cbus/gdc.c
parent7716c5370ad4c724650bb6def35750d561bc11d2 (diff)
downloadFreeBSD-src-b5738d479e0eaad924b34c5d0b2d67227187006f.zip
FreeBSD-src-b5738d479e0eaad924b34c5d0b2d67227187006f.tar.gz
Merge from the following changes.
sys/conf/files.i386 1.321 sys/dev/syscons/syscons.c 1.343 sys/i386/isa/spkr.c 1.46 sys/isa/fd.c 1.183 and 1.185 sys/isa/syscons_isa.c 1.14 sys/isa/vga_isa.c 1.18
Diffstat (limited to 'sys/pc98/cbus/gdc.c')
-rw-r--r--sys/pc98/cbus/gdc.c40
1 files changed, 22 insertions, 18 deletions
diff --git a/sys/pc98/cbus/gdc.c b/sys/pc98/cbus/gdc.c
index a1522e7..a3f8afb 100644
--- a/sys/pc98/cbus/gdc.c
+++ b/sys/pc98/cbus/gdc.c
@@ -70,23 +70,6 @@ typedef struct gdc_softc {
static devclass_t gdc_devclass;
-static int gdcprobe(device_t dev);
-static int gdc_attach(device_t dev);
-
-static device_method_t gdc_methods[] = {
- DEVMETHOD(device_probe, gdcprobe),
- DEVMETHOD(device_attach, gdc_attach),
- { 0, 0 }
-};
-
-static driver_t gdcdriver = {
- DRIVER_NAME,
- gdc_methods,
- sizeof(gdc_softc_t),
-};
-
-DRIVER_MODULE(gdc, isa, gdcdriver, gdc_devclass, 0, 0);
-
static int gdc_probe_unit(int unit, gdc_softc_t *sc, int flags);
static int gdc_attach_unit(int unit, gdc_softc_t *sc, int flags);
@@ -118,8 +101,14 @@ static struct cdevsw gdc_cdevsw = {
#endif /* FB_INSTALL_CDEV */
+static void
+gdc_identify(driver_t *driver, device_t parent)
+{
+ BUS_ADD_CHILD(parent, ISA_ORDER_SPECULATIVE, DRIVER_NAME, 0);
+}
+
static int
-gdcprobe(device_t dev)
+gdc_probe(device_t dev)
{
gdc_softc_t *sc;
@@ -244,6 +233,21 @@ gdcmmap(dev_t dev, vm_offset_t offset, int prot)
#endif /* FB_INSTALL_CDEV */
+static device_method_t gdc_methods[] = {
+ DEVMETHOD(device_identify, gdc_identify),
+ DEVMETHOD(device_probe, gdc_probe),
+ DEVMETHOD(device_attach, gdc_attach),
+ { 0, 0 }
+};
+
+static driver_t gdcdriver = {
+ DRIVER_NAME,
+ gdc_methods,
+ sizeof(gdc_softc_t),
+};
+
+DRIVER_MODULE(gdc, isa, gdcdriver, gdc_devclass, 0, 0);
+
/* LOW-LEVEL */
#include <machine/clock.h>
OpenPOWER on IntegriCloud