aboutsummaryrefslogtreecommitdiff
path: root/sys/mips/rt305x
diff options
context:
space:
mode:
authorHans Petter Selasky <hselasky@FreeBSD.org>2011-12-14 00:28:54 +0000
committerHans Petter Selasky <hselasky@FreeBSD.org>2011-12-14 00:28:54 +0000
commit2e1417489338b971e5fd599ff48b5f65df9e8d3b (patch)
tree56520f5d0635d8db6259b372fff280b4e6288da5 /sys/mips/rt305x
parent2f467d2d1697e01c86483e46fb65a89494892049 (diff)
downloadsrc-2e1417489338b971e5fd599ff48b5f65df9e8d3b.tar.gz
src-2e1417489338b971e5fd599ff48b5f65df9e8d3b.zip
Implement better support for USB controller suspend and resume.
This patch should remove the need for kldunload of USB controller drivers at suspend and kldload of USB controller drivers at resume. This patch also fixes some build issues in avr32dci.c MFC after: 2 weeks
Notes
Notes: svn path=/head/; revision=228483
Diffstat (limited to 'sys/mips/rt305x')
-rw-r--r--sys/mips/rt305x/rt305x_dotg.c26
1 files changed, 6 insertions, 20 deletions
diff --git a/sys/mips/rt305x/rt305x_dotg.c b/sys/mips/rt305x/rt305x_dotg.c
index 67666f70aae1..89b493321da4 100644
--- a/sys/mips/rt305x/rt305x_dotg.c
+++ b/sys/mips/rt305x/rt305x_dotg.c
@@ -67,7 +67,6 @@ __FBSDID("$FreeBSD$");
static device_probe_t dotg_obio_probe;
static device_attach_t dotg_obio_attach;
static device_detach_t dotg_obio_detach;
-static device_shutdown_t dotg_obio_shutdown;
struct dotg_obio_softc {
struct dotg_softc sc_dci; /* must be first */
@@ -208,35 +207,22 @@ dotg_obio_detach(device_t dev)
return (0);
}
-static int
-dotg_obio_shutdown(device_t dev)
-{
- struct dotg_obio_softc *sc = device_get_softc(dev);
- int err;
-
- err = bus_generic_shutdown(dev);
- if (err)
- return (err);
-
- dotg_uninit(&sc->sc_dci);
-
- return (0);
-}
-
static device_method_t dotg_obio_methods[] = {
/* Device interface */
DEVMETHOD(device_probe, dotg_obio_probe),
DEVMETHOD(device_attach, dotg_obio_attach),
DEVMETHOD(device_detach, dotg_obio_detach),
- DEVMETHOD(device_shutdown, dotg_obio_shutdown),
+ DEVMETHOD(device_suspend, bus_generic_suspend),
+ DEVMETHOD(device_resume, bus_generic_resume),
+ DEVMETHOD(device_shutdown, bus_generic_shutdown),
DEVMETHOD_END
};
static driver_t dotg_obio_driver = {
- "dotg",
- dotg_obio_methods,
- sizeof(struct dotg_obio_softc),
+ .name = "dotg",
+ .methods = dotg_obio_methods,
+ .size = sizeof(struct dotg_obio_softc),
};
static devclass_t dotg_obio_devclass;