PERFORCE change 53716 for review
Scott Long
scottl at FreeBSD.org
Fri May 28 21:23:37 PDT 2004
http://perforce.freebsd.org/chv.cgi?CH=53716
Change 53716 by scottl at scottl-esp-sparc64 on 2004/05/28 21:22:13
Add default dummy functions for suspend, resume, and attach.
Affected files ...
.. //depot/projects/scottl-esp/src/sys/dev/esp/esp_sbus.c#8 edit
Differences ...
==== //depot/projects/scottl-esp/src/sys/dev/esp/esp_sbus.c#8 (text+ko) ====
@@ -89,15 +89,16 @@
static int esp_sbus_probe(device_t);
static int esp_sbus_attach(device_t);
+static int esp_sbus_detach(device_t);
+static int esp_sbus_suspend(device_t);
+static int esp_sbus_resume(device_t);
static device_method_t esp_sbus_methods[] = {
DEVMETHOD(device_probe, esp_sbus_probe),
DEVMETHOD(device_attach, esp_sbus_attach),
-#if 0
- DEVMETHOD(device_detach, espdetach_sbus),
- DEVMETHOD(device_suspend, espsuspend_sbus),
- DEVMETHOD(device_resume, espresume_sbus),
-#endif
+ DEVMETHOD(device_detach, esp_sbus_detach),
+ DEVMETHOD(device_suspend, esp_sbus_suspend),
+ DEVMETHOD(device_resume, esp_sbus_resume),
{0, 0}
};
@@ -238,6 +239,29 @@
return (0);
}
+static int
+esp_sbus_detach(device_t dev)
+{
+ struct ncr53c9x_softc *sc;
+ struct esp_softc *esc;
+
+ esc = device_get_softc(dev);
+ sc = &esc->sc_ncr53c9x;
+ return (ncr53c9x_detach(sc, 0));
+}
+
+static int
+esp_sbus_suspend(device_t dev)
+{
+ return (ENXIO);
+}
+
+static int
+esp_sbus_resume(device_t dev)
+{
+ return (ENXIO);
+}
+
/*
* Attach this instance, and then all the sub-devices
*/
More information about the p4-projects
mailing list