Static bool athn_pci_suspend(device_t self, const pmf_qual_t *qual) { struct athn_pci_softc *psc = device_private(self); struct athn_softc *sc = &psc->psc_sc; athn_suspend(sc); if (psc->psc_ih != NULL) { pci_intr_disestablish(psc->psc_pc, psc->psc_ih); psc->psc_ih = NULL; } return true; }
int athn_pci_activate(struct device *self, int act) { struct athn_pci_softc *psc = (struct athn_pci_softc *)self; struct athn_softc *sc = &psc->sc_sc; switch (act) { case DVACT_SUSPEND: athn_suspend(sc); break; case DVACT_WAKEUP: athn_pci_wakeup(psc); break; } return (0); }