summaryrefslogtreecommitdiffstats
path: root/sys/isa
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1999-09-03 11:32:21 +0000
committerpeter <peter@FreeBSD.org>1999-09-03 11:32:21 +0000
commitafe8351c908d1ac395ec057a78518bb36db07da4 (patch)
tree20be182c4b2f43369410a9d240c55e88d07bd3ab /sys/isa
parent8258db9b9202a1cadabb689d27328ef31bb00abc (diff)
downloadFreeBSD-src-afe8351c908d1ac395ec057a78518bb36db07da4.zip
FreeBSD-src-afe8351c908d1ac395ec057a78518bb36db07da4.tar.gz
Cosmetic tweak. Collect the fdc methods together and apart from the fd
methods so it's a little easier to seperate the two when reading the code.
Diffstat (limited to 'sys/isa')
-rw-r--r--sys/isa/fd.c97
1 files changed, 53 insertions, 44 deletions
diff --git a/sys/isa/fd.c b/sys/isa/fd.c
index 7704cca..1097933 100644
--- a/sys/isa/fd.c
+++ b/sys/isa/fd.c
@@ -568,6 +568,9 @@ fd_read_status(fdc_p fdc, int fdsu)
/* autoconfiguration stuff */
/****************************************************************************/
+/*
+ * fdc controller section.
+ */
static int
fdc_probe(device_t dev)
{
@@ -760,6 +763,34 @@ fdc_print_child(device_t me, device_t child)
return (retval);
}
+static device_method_t fdc_methods[] = {
+ /* Device interface */
+ DEVMETHOD(device_probe, fdc_probe),
+ DEVMETHOD(device_attach, fdc_attach),
+ DEVMETHOD(device_detach, bus_generic_detach),
+ DEVMETHOD(device_shutdown, bus_generic_shutdown),
+ DEVMETHOD(device_suspend, bus_generic_suspend),
+ DEVMETHOD(device_resume, bus_generic_resume),
+
+ /* Bus interface */
+ DEVMETHOD(bus_print_child, fdc_print_child),
+ /* Our children never use any other bus interface methods. */
+
+ { 0, 0 }
+};
+
+static driver_t fdc_driver = {
+ "fdc",
+ fdc_methods,
+ sizeof(struct fdc_data)
+};
+
+DRIVER_MODULE(fdc, isa, fdc_driver, fdc_devclass, 0, 0);
+
+/******************************************************************/
+/*
+ * devices attached to the controller section.
+ */
static int
fd_probe(device_t dev)
{
@@ -932,6 +963,28 @@ fd_attach(device_t dev)
return (0);
}
+static device_method_t fd_methods[] = {
+ /* Device interface */
+ DEVMETHOD(device_probe, fd_probe),
+ DEVMETHOD(device_attach, fd_attach),
+ DEVMETHOD(device_detach, bus_generic_detach),
+ DEVMETHOD(device_shutdown, bus_generic_shutdown),
+ DEVMETHOD(device_suspend, bus_generic_suspend), /* XXX */
+ DEVMETHOD(device_resume, bus_generic_resume), /* XXX */
+
+ { 0, 0 }
+};
+
+static driver_t fd_driver = {
+ "fd",
+ fd_methods,
+ sizeof(struct fd_data)
+};
+
+DEV_DRIVER_MODULE(fd, fdc, fd_driver, fd_devclass, fd_cdevsw, 0, 0);
+
+/******************************************************************/
+
#ifdef FDC_YE
/*
* this is a subset of fdattach() optimized for the Y-E Data
@@ -2244,50 +2297,6 @@ fdioctl(dev, cmd, addr, flag, p)
return (error);
}
-static device_method_t fdc_methods[] = {
- /* Device interface */
- DEVMETHOD(device_probe, fdc_probe),
- DEVMETHOD(device_attach, fdc_attach),
- DEVMETHOD(device_detach, bus_generic_detach),
- DEVMETHOD(device_shutdown, bus_generic_shutdown),
- DEVMETHOD(device_suspend, bus_generic_suspend),
- DEVMETHOD(device_resume, bus_generic_resume),
-
- /* Bus interface */
- DEVMETHOD(bus_print_child, fdc_print_child),
- /* Our children never use any other bus interface methods. */
-
- { 0, 0 }
-};
-
-static driver_t fdc_driver = {
- "fdc",
- fdc_methods,
- sizeof(struct fdc_data)
-};
-
-DRIVER_MODULE(fdc, isa, fdc_driver, fdc_devclass, 0, 0);
-
-static device_method_t fd_methods[] = {
- /* Device interface */
- DEVMETHOD(device_probe, fd_probe),
- DEVMETHOD(device_attach, fd_attach),
- DEVMETHOD(device_detach, bus_generic_detach),
- DEVMETHOD(device_shutdown, bus_generic_shutdown),
- DEVMETHOD(device_suspend, bus_generic_suspend), /* XXX */
- DEVMETHOD(device_resume, bus_generic_resume), /* XXX */
-
- { 0, 0 }
-};
-
-static driver_t fd_driver = {
- "fd",
- fd_methods,
- sizeof(struct fd_data)
-};
-
-DEV_DRIVER_MODULE(fd, fdc, fd_driver, fd_devclass, fd_cdevsw, 0, 0);
-
#endif /* NFDC > 0 */
/*
OpenPOWER on IntegriCloud