Deleted Added
full compact
fbd.c (257727) fbd.c (257815)
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: user/ed/newcons/sys/dev/fb/fbd.c 257727 2013-11-05 23:12:53Z ray $
29 * $FreeBSD: user/ed/newcons/sys/dev/fb/fbd.c 257815 2013-11-07 21:08:52Z ray $
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: user/ed/newcons/sys/dev/fb/fbd.c 257727 2013-11-05 23:12:53Z ray $");
37__FBSDID("$FreeBSD: user/ed/newcons/sys/dev/fb/fbd.c 257815 2013-11-07 21:08:52Z ray $");
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>

--- 342 unchanged lines hidden (view full) ---

388
389 sc = device_get_softc(dev);
390
391 err = fbd_unregister(sc->sc_info);
392
393 return (err);
394}
395
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>

--- 342 unchanged lines hidden (view full) ---

388
389 sc = device_get_softc(dev);
390
391 err = fbd_unregister(sc->sc_info);
392
393 return (err);
394}
395
396static int
397fbd_suspend(device_t dev)
398{
396
399
400 vt_fb_suspend();
401 return (bus_generic_suspend(dev));
402}
403
404static int
405fbd_resume(device_t dev)
406{
407
408 vt_fb_resume();
409 return (bus_generic_resume(dev));
410}
411
397static device_method_t fbd_methods[] = {
398 /* Device interface */
399 DEVMETHOD(device_probe, fbd_probe),
400 DEVMETHOD(device_attach, fbd_attach),
401 DEVMETHOD(device_detach, fbd_detach),
402
403 DEVMETHOD(device_shutdown, bus_generic_shutdown),
412static device_method_t fbd_methods[] = {
413 /* Device interface */
414 DEVMETHOD(device_probe, fbd_probe),
415 DEVMETHOD(device_attach, fbd_attach),
416 DEVMETHOD(device_detach, fbd_detach),
417
418 DEVMETHOD(device_shutdown, bus_generic_shutdown),
404 DEVMETHOD(device_suspend, bus_generic_suspend),
405 DEVMETHOD(device_resume, bus_generic_resume),
419 DEVMETHOD(device_suspend, fbd_suspend),
420 DEVMETHOD(device_resume, fbd_resume),
406
407 { 0, 0 }
408};
409
410driver_t fbd_driver = {
411 "fbd",
412 fbd_methods,
413 sizeof(struct fbd_softc)
414};
415
416devclass_t fbd_devclass;
417
418DRIVER_MODULE(fbd, fb, fbd_driver, fbd_devclass, 0, 0);
419DRIVER_MODULE(fbd, drmn, fbd_driver, fbd_devclass, 0, 0);
420MODULE_VERSION(fbd, 1);
421
421
422 { 0, 0 }
423};
424
425driver_t fbd_driver = {
426 "fbd",
427 fbd_methods,
428 sizeof(struct fbd_softc)
429};
430
431devclass_t fbd_devclass;
432
433DRIVER_MODULE(fbd, fb, fbd_driver, fbd_devclass, 0, 0);
434DRIVER_MODULE(fbd, drmn, fbd_driver, fbd_devclass, 0, 0);
435MODULE_VERSION(fbd, 1);
436