From f83ac2a911594e6e52bcb1b99774c0946a41019d Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Tue, 31 Aug 2010 16:27:37 +0000 Subject: activate function should return result of config_activate_children --- sys/dev/pci/if_bge.c | 9 +++++---- sys/dev/pci/if_nfe.c | 9 +++++---- sys/dev/pci/if_sis.c | 9 +++++---- sys/dev/sdmmc/sdhc.c | 10 +++++----- 4 files changed, 20 insertions(+), 17 deletions(-) (limited to 'sys') diff --git a/sys/dev/pci/if_bge.c b/sys/dev/pci/if_bge.c index b6d90cadb7a..53ca5156013 100644 --- a/sys/dev/pci/if_bge.c +++ b/sys/dev/pci/if_bge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_bge.c,v 1.299 2010/08/27 19:48:14 deraadt Exp $ */ +/* $OpenBSD: if_bge.c,v 1.300 2010/08/31 16:27:36 deraadt Exp $ */ /* * Copyright (c) 2001 Wind River Systems @@ -2293,20 +2293,21 @@ bge_activate(struct device *self, int act) { struct bge_softc *sc = (struct bge_softc *)self; struct ifnet *ifp = &sc->arpcom.ac_if; + int rv = 0; switch (act) { case DVACT_SUSPEND: - config_activate_children(self, act); + rv = config_activate_children(self, act); if (ifp->if_flags & IFF_RUNNING) bge_stop(sc); break; case DVACT_RESUME: if (ifp->if_flags & IFF_UP) bge_init(sc); - config_activate_children(self, act); + rv = config_activate_children(self, act); break; } - return (0); + return (rv); } void diff --git a/sys/dev/pci/if_nfe.c b/sys/dev/pci/if_nfe.c index b3a7303fa0b..c1920c0593f 100644 --- a/sys/dev/pci/if_nfe.c +++ b/sys/dev/pci/if_nfe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_nfe.c,v 1.93 2010/08/27 19:56:23 deraadt Exp $ */ +/* $OpenBSD: if_nfe.c,v 1.94 2010/08/31 16:27:09 deraadt Exp $ */ /*- * Copyright (c) 2006, 2007 Damien Bergamini @@ -179,20 +179,21 @@ nfe_activate(struct device *self, int act) { struct nfe_softc *sc = (struct nfe_softc *)self; struct ifnet *ifp = &sc->sc_arpcom.ac_if; + int rv = 0; switch (act) { case DVACT_SUSPEND: if (ifp->if_flags & IFF_RUNNING) nfe_stop(ifp, 0); - config_activate_children(self, act); + rv = config_activate_children(self, act); break; case DVACT_RESUME: - config_activate_children(self, act); + rv = config_activate_children(self, act); if (ifp->if_flags & IFF_UP) nfe_init(ifp); break; } - return (0); + return (rv); } diff --git a/sys/dev/pci/if_sis.c b/sys/dev/pci/if_sis.c index 2d80c46805a..7069bee550f 100644 --- a/sys/dev/pci/if_sis.c +++ b/sys/dev/pci/if_sis.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_sis.c,v 1.99 2010/08/06 05:24:16 deraadt Exp $ */ +/* $OpenBSD: if_sis.c,v 1.100 2010/08/31 16:26:19 deraadt Exp $ */ /* * Copyright (c) 1997, 1998, 1999 * Bill Paul . All rights reserved. @@ -1158,20 +1158,21 @@ sis_activate(struct device *self, int act) { struct sis_softc *sc = (struct sis_softc *)self; struct ifnet *ifp = &sc->arpcom.ac_if; + int rv = 0; switch (act) { case DVACT_SUSPEND: if (ifp->if_flags & IFF_RUNNING) sis_stop(sc); - config_activate_children(self, act); + rv = config_activate_children(self, act); break; case DVACT_RESUME: - config_activate_children(self, act); + rv = config_activate_children(self, act); if (ifp->if_flags & IFF_UP) sis_init(sc); break; } - return (0); + return (rv); } /* diff --git a/sys/dev/sdmmc/sdhc.c b/sys/dev/sdmmc/sdhc.c index d09d613cf89..e2704bb6547 100644 --- a/sys/dev/sdmmc/sdhc.c +++ b/sys/dev/sdmmc/sdhc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sdhc.c,v 1.30 2010/08/27 15:41:43 deraadt Exp $ */ +/* $OpenBSD: sdhc.c,v 1.31 2010/08/31 16:25:28 deraadt Exp $ */ /* * Copyright (c) 2006 Uwe Stuehler @@ -253,7 +253,7 @@ sdhc_activate(struct device *self, int act) { struct sdhc_softc *sc = (struct sdhc_softc *)self; struct sdhc_host *hp; - int n, i; + int n, i, rv = 0; switch (act) { case DVACT_SUSPEND: @@ -266,7 +266,7 @@ sdhc_activate(struct device *self, int act) for (i = 0; i < sizeof hp->regs; i++) hp->regs[i] = HREAD1(hp, i); } - config_activate_children((struct device *)sc, act); + rv = config_activate_children(self, act); break; case DVACT_RESUME: /* Restore the host controller state. */ @@ -276,10 +276,10 @@ sdhc_activate(struct device *self, int act) for (i = 0; i < sizeof hp->regs; i++) HWRITE1(hp, i, hp->regs[i]); } - config_activate_children((struct device *)sc, act); + rv = config_activate_children(self, act); break; } - return (0); + return (rv); } void -- cgit v1.2.3