static int
isavga_resume(device_t dev)
{
	vga_softc_t *sc;

	sc = device_get_softc(dev);
	if (sc->state_buf != NULL) {
		if (vidd_load_state(sc->adp, sc->state_buf) != 0)
			device_printf(dev, "failed to reload state\n");
		free(sc->state_buf, M_TEMP);
		sc->state_buf = NULL;
	}

	bus_generic_resume(dev);
	return 0;
}
Exemple #2
0
static void
vga_resume(device_t dev)
{
	vga_softc_t *sc;

	sc = device_get_softc(dev);

	if (sc->state_buf != NULL) {
		if (vidd_load_state(sc->adp, sc->state_buf) != 0)
			device_printf(dev, "failed to reload state\n");
		free(sc->state_buf, M_TEMP);
		sc->state_buf = NULL;
	}
	if (sc->pal_buf != NULL) {
		if (vidd_load_palette(sc->adp, sc->pal_buf) != 0)
			device_printf(dev, "failed to reload palette\n");
		free(sc->pal_buf, M_TEMP);
		sc->pal_buf = NULL;
	}
}