diff options
author | imp <imp@FreeBSD.org> | 2000-12-26 06:38:04 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2000-12-26 06:38:04 +0000 |
commit | e60a899d719914bd1c04c0647458145c90c8276f (patch) | |
tree | 75be47731d13c8e57800415deb308132bad98de1 /sys/dev/ed/if_ed_cbus.c | |
parent | 3952616eceff82bad15fb54dfa34cb453a132a7a (diff) | |
download | FreeBSD-src-e60a899d719914bd1c04c0647458145c90c8276f.zip FreeBSD-src-e60a899d719914bd1c04c0647458145c90c8276f.tar.gz |
Minor newbus/style(9) cleanups.
o Move the ax88190 code to its own function.
o Move all device_method_t, driver_t and DRIVER_MODULE definitions to the
end of files.
o Wrap a few lines > 80 characters.
o Use the same devclass for all ed drivers. This allows machines with
multiple types of cards to have their cards numbered correctly. Before,
you could wind up with two ed0's.
o Protect if_edvar.h from multiple includes because I was there.
Diffstat (limited to 'sys/dev/ed/if_ed_cbus.c')
-rw-r--r-- | sys/dev/ed/if_ed_cbus.c | 34 |
1 files changed, 16 insertions, 18 deletions
diff --git a/sys/dev/ed/if_ed_cbus.c b/sys/dev/ed/if_ed_cbus.c index a29284d..1ea4af8 100644 --- a/sys/dev/ed/if_ed_cbus.c +++ b/sys/dev/ed/if_ed_cbus.c @@ -280,24 +280,6 @@ ed_isa_attach(dev) return ed_attach(sc, device_get_unit(dev), flags); } -static device_method_t ed_isa_methods[] = { - /* Device interface */ - DEVMETHOD(device_probe, ed_isa_probe), - DEVMETHOD(device_attach, ed_isa_attach), - - { 0, 0 } -}; - -static driver_t ed_isa_driver = { - "ed", - ed_isa_methods, - sizeof(struct ed_softc) -}; - -static devclass_t ed_isa_devclass; - -DRIVER_MODULE(if_ed, isa, ed_isa_driver, ed_isa_devclass, 0, 0); - #ifdef PC98 /* * Interrupt conversion table for EtherEZ98 @@ -1756,3 +1738,19 @@ ed_pio_testmem(sc, page_offset, isa16bit, flags) return (1); } #endif /* PC98 */ + +static device_method_t ed_isa_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, ed_isa_probe), + DEVMETHOD(device_attach, ed_isa_attach), + + { 0, 0 } +}; + +static driver_t ed_isa_driver = { + "ed", + ed_isa_methods, + sizeof(struct ed_softc) +}; + +DRIVER_MODULE(if_ed, isa, ed_isa_driver, ed_devclass, 0, 0); |