Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/fb/fbd.c
Show First 20 Lines • Show All 326 Lines • ▼ Show 20 Lines | fbd_detach(device_t dev) | ||||
sc = device_get_softc(dev); | sc = device_get_softc(dev); | ||||
err = fbd_unregister(sc->sc_info); | err = fbd_unregister(sc->sc_info); | ||||
return (err); | return (err); | ||||
} | } | ||||
static int | |||||
fbd_suspend(device_t dev) | |||||
{ | |||||
vt_fb_suspend(); | |||||
return (bus_generic_suspend(dev)); | |||||
} | |||||
static int | |||||
fbd_resume(device_t dev) | |||||
{ | |||||
vt_fb_resume(); | |||||
return (bus_generic_resume(dev)); | |||||
} | |||||
static device_method_t fbd_methods[] = { | static device_method_t fbd_methods[] = { | ||||
/* Device interface */ | /* Device interface */ | ||||
DEVMETHOD(device_probe, fbd_probe), | DEVMETHOD(device_probe, fbd_probe), | ||||
DEVMETHOD(device_attach, fbd_attach), | DEVMETHOD(device_attach, fbd_attach), | ||||
DEVMETHOD(device_detach, fbd_detach), | DEVMETHOD(device_detach, fbd_detach), | ||||
DEVMETHOD(device_shutdown, bus_generic_shutdown), | DEVMETHOD(device_shutdown, bus_generic_shutdown), | ||||
DEVMETHOD(device_suspend, fbd_suspend), | |||||
DEVMETHOD(device_resume, fbd_resume), | |||||
{ 0, 0 } | { 0, 0 } | ||||
}; | }; | ||||
driver_t fbd_driver = { | driver_t fbd_driver = { | ||||
"fbd", | "fbd", | ||||
fbd_methods, | fbd_methods, | ||||
sizeof(struct fbd_softc) | sizeof(struct fbd_softc) | ||||
}; | }; | ||||
devclass_t fbd_devclass; | devclass_t fbd_devclass; | ||||
DRIVER_MODULE(fbd, fb, fbd_driver, fbd_devclass, 0, 0); | DRIVER_MODULE(fbd, fb, fbd_driver, fbd_devclass, 0, 0); | ||||
DRIVER_MODULE(fbd, drmn, fbd_driver, fbd_devclass, 0, 0); | DRIVER_MODULE(fbd, drmn, fbd_driver, fbd_devclass, 0, 0); | ||||
MODULE_VERSION(fbd, 1); | MODULE_VERSION(fbd, 1); | ||||