diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2024-08-25 14:51:34 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2024-08-25 14:51:34 +0000 |
commit | 6d6224bbd18c1b64a5a4c4ff6592e7274e1698aa (patch) | |
tree | db39f2dd418c9c6cc1a1a39bc2c656fb6916981c /sys/arch/alpha | |
parent | 854bed5a582ce46b3775962e094797f848871e13 (diff) |
make activate function confirm to the common idiom; ok miod
Diffstat (limited to 'sys/arch/alpha')
-rw-r--r-- | sys/arch/alpha/tc/tc_3000_500.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/sys/arch/alpha/tc/tc_3000_500.c b/sys/arch/alpha/tc/tc_3000_500.c index e7a52f0daa8..3a1e362dd09 100644 --- a/sys/arch/alpha/tc/tc_3000_500.c +++ b/sys/arch/alpha/tc/tc_3000_500.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tc_3000_500.c,v 1.21 2017/11/02 14:04:24 mpi Exp $ */ +/* $OpenBSD: tc_3000_500.c,v 1.22 2024/08/25 14:51:33 deraadt Exp $ */ /* $NetBSD: tc_3000_500.c,v 1.24 2001/07/27 00:25:21 thorpej Exp $ */ /* @@ -330,16 +330,19 @@ tc_3000_500_ioslot(slot, flags, set) int tc_3000_500_activate(struct device *self, int act) { - int rc = config_activate_children(self, act); int slot; + int rv; - /* - * Reset all slots to non-sgmap when halting. - */ - if (act == DVACT_POWERDOWN) { + switch (act) + case DVACT_POWERDOWN: + rv = config_activate_children(self, act); + /* Reset all slots to non-sgmap when halting. */ for (slot = 0; slot < tc_3000_500_nslots; slot++) tc_3000_500_ioslot(slot, IOSLOT_S, 0); + break; + default: + rv = config_activate_children(self, act); + break; } - - return rc; + return rv; } |