fbd.c (269779) | fbd.c (277795) |
---|---|
1/*- 2 * Copyright (c) 2013 The FreeBSD Foundation 3 * All rights reserved. 4 * 5 * This software was developed by Aleksandr Rybalko under sponsorship from the 6 * FreeBSD Foundation. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 12 unchanged lines hidden (view full) --- 21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * | 1/*- 2 * Copyright (c) 2013 The FreeBSD Foundation 3 * All rights reserved. 4 * 5 * This software was developed by Aleksandr Rybalko under sponsorship from the 6 * FreeBSD Foundation. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 12 unchanged lines hidden (view full) --- 21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * |
29 * $FreeBSD: head/sys/dev/fb/fbd.c 269779 2014-08-10 14:55:39Z dumbbell $ | 29 * $FreeBSD: head/sys/dev/fb/fbd.c 277795 2015-01-27 15:28:46Z avg $ |
30 */ 31 32/* Generic framebuffer */ 33/* TODO unlink from VT(9) */ 34/* TODO done normal /dev/fb methods */ 35 36#include <sys/cdefs.h> | 30 */ 31 32/* Generic framebuffer */ 33/* TODO unlink from VT(9) */ 34/* TODO done normal /dev/fb methods */ 35 36#include <sys/cdefs.h> |
37__FBSDID("$FreeBSD: head/sys/dev/fb/fbd.c 269779 2014-08-10 14:55:39Z dumbbell $"); | 37__FBSDID("$FreeBSD: head/sys/dev/fb/fbd.c 277795 2015-01-27 15:28:46Z avg $"); |
38 39#include <sys/param.h> 40#include <sys/systm.h> 41#include <sys/bus.h> 42#include <sys/conf.h> 43#include <sys/kernel.h> 44#include <sys/malloc.h> 45#include <sys/module.h> --- 281 unchanged lines hidden (view full) --- 327 328 sc = device_get_softc(dev); 329 330 err = fbd_unregister(sc->sc_info); 331 332 return (err); 333} 334 | 38 39#include <sys/param.h> 40#include <sys/systm.h> 41#include <sys/bus.h> 42#include <sys/conf.h> 43#include <sys/kernel.h> 44#include <sys/malloc.h> 45#include <sys/module.h> --- 281 unchanged lines hidden (view full) --- 327 328 sc = device_get_softc(dev); 329 330 err = fbd_unregister(sc->sc_info); 331 332 return (err); 333} 334 |
335static int 336fbd_suspend(device_t dev) 337{ 338 339 vt_fb_suspend(); 340 return (bus_generic_suspend(dev)); 341} 342 343static int 344fbd_resume(device_t dev) 345{ 346 347 vt_fb_resume(); 348 return (bus_generic_resume(dev)); 349} 350 | |
351static device_method_t fbd_methods[] = { 352 /* Device interface */ 353 DEVMETHOD(device_probe, fbd_probe), 354 DEVMETHOD(device_attach, fbd_attach), 355 DEVMETHOD(device_detach, fbd_detach), 356 357 DEVMETHOD(device_shutdown, bus_generic_shutdown), | 335static device_method_t fbd_methods[] = { 336 /* Device interface */ 337 DEVMETHOD(device_probe, fbd_probe), 338 DEVMETHOD(device_attach, fbd_attach), 339 DEVMETHOD(device_detach, fbd_detach), 340 341 DEVMETHOD(device_shutdown, bus_generic_shutdown), |
358 DEVMETHOD(device_suspend, fbd_suspend), 359 DEVMETHOD(device_resume, fbd_resume), | |
360 361 { 0, 0 } 362}; 363 364driver_t fbd_driver = { 365 "fbd", 366 fbd_methods, 367 sizeof(struct fbd_softc) 368}; 369 370devclass_t fbd_devclass; 371 372DRIVER_MODULE(fbd, fb, fbd_driver, fbd_devclass, 0, 0); 373DRIVER_MODULE(fbd, drmn, fbd_driver, fbd_devclass, 0, 0); 374MODULE_VERSION(fbd, 1); 375 | 342 343 { 0, 0 } 344}; 345 346driver_t fbd_driver = { 347 "fbd", 348 fbd_methods, 349 sizeof(struct fbd_softc) 350}; 351 352devclass_t fbd_devclass; 353 354DRIVER_MODULE(fbd, fb, fbd_driver, fbd_devclass, 0, 0); 355DRIVER_MODULE(fbd, drmn, fbd_driver, fbd_devclass, 0, 0); 356MODULE_VERSION(fbd, 1); 357 |