apm_record_event(sc, type); apm_suspend(sc);
(void)apm_record_event(sc, type);  apm_suspends++;
apm_handle_event(struct pxa2x0_apm_softc *sc, u_int type){	struct	apm_power_info power;	int	ret = 0;	switch (type) {	case APM_NOEVENT:		ret = 1;		break;	case APM_CRIT_SUSPEND_REQ:		DPRINTF(("suspend required immediately\n"));		apm_record_event(sc, type);		apm_suspend(sc);		break;	case APM_USER_SUSPEND_REQ:	case APM_SUSPEND_REQ:		DPRINTF(("suspend requested\n"));		if (apm_record_event(sc, type)) {			DPRINTF(("suspend ourselves\n"));			apm_suspends++;		}		break;	case APM_POWER_CHANGE:		DPRINTF(("power status change\n"));		apm_power_info(sc, &power);		if (power.battery_life != APM_BATT_LIFE_UNKNOWN &&		    power.battery_life < cpu_apmwarn &&		    (sc->sc_flags & SCFLAG_PRINT) != SCFLAG_NOPRINT &&		    ((sc->sc_flags & SCFLAG_PRINT) != SCFLAG_PCTPRINT ||		    sc->sc_batt_life != power.battery_life)) {			sc->sc_batt_life = power.battery_life;			apm_power_print(sc, &power);		}		apm_record_event(sc, type);		break;	case APM_BATTERY_LOW:		DPRINTF(("Battery low!\n"));		apm_battlow++;		apm_record_event(sc, type);		break;	default:		DPRINTF(("apm_handle_event: unsupported event, code %d\n",		    type));	}	return (ret);}