summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2014-09-20 09:28:26 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2014-09-20 09:28:26 +0000
commit0411143cd661f91b47c9954540de13edb2010671 (patch)
tree38691f10b2184fb53c78d5d90d5db27d1217d90d /sys
parent05688749de1dec0d8e6f90001a2baabb9ee086e1 (diff)
Use config_suspend_all(9).
ok mpi@, uebayasi@, dlg@
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/alpha/alpha/machdep.c7
-rw-r--r--sys/arch/arm/xscale/pxa2x0_apm.c12
-rw-r--r--sys/arch/armish/armish/armish_machdep.c8
-rw-r--r--sys/arch/armv7/armv7/armv7_machdep.c11
-rw-r--r--sys/arch/aviion/aviion/machdep.c8
-rw-r--r--sys/arch/landisk/landisk/machdep.c8
-rw-r--r--sys/arch/loongson/dev/apm.c13
-rw-r--r--sys/arch/loongson/loongson/machdep.c11
-rw-r--r--sys/arch/luna88k/luna88k/machdep.c8
-rw-r--r--sys/arch/octeon/octeon/machdep.c8
-rw-r--r--sys/arch/sgi/sgi/machdep.c8
-rw-r--r--sys/arch/solbourne/solbourne/machdep.c7
-rw-r--r--sys/arch/sparc/sparc/machdep.c7
-rw-r--r--sys/arch/vax/vax/machdep.c8
-rw-r--r--sys/arch/zaurus/dev/zaurus_apm.c13
-rw-r--r--sys/arch/zaurus/zaurus/zaurus_machdep.c7
16 files changed, 45 insertions, 99 deletions
diff --git a/sys/arch/alpha/alpha/machdep.c b/sys/arch/alpha/alpha/machdep.c
index 4d9adfcdbba..050601817e6 100644
--- a/sys/arch/alpha/alpha/machdep.c
+++ b/sys/arch/alpha/alpha/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.164 2014/07/21 17:25:47 uebayasi Exp $ */
+/* $OpenBSD: machdep.c,v 1.165 2014/09/20 09:28:24 kettenis Exp $ */
/* $NetBSD: machdep.c,v 1.210 2000/06/01 17:12:38 thorpej Exp $ */
/*-
@@ -971,7 +971,6 @@ struct pcb dumppcb;
__dead void
boot(int howto)
{
- struct device *mainbus;
#if defined(MULTIPROCESSOR)
u_long wait_mask;
int i;
@@ -1030,9 +1029,7 @@ boot(int howto)
haltsys:
doshutdownhooks();
- mainbus = device_mainbus();
- if (mainbus != NULL)
- config_suspend(mainbus, DVACT_POWERDOWN);
+ config_suspend_all(DVACT_POWERDOWN);
#ifdef BOOTKEY
printf("hit any key to %s...\n",
diff --git a/sys/arch/arm/xscale/pxa2x0_apm.c b/sys/arch/arm/xscale/pxa2x0_apm.c
index 7d4a97388a3..71561fed1be 100644
--- a/sys/arch/arm/xscale/pxa2x0_apm.c
+++ b/sys/arch/arm/xscale/pxa2x0_apm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pxa2x0_apm.c,v 1.42 2014/03/13 03:52:55 dlg Exp $ */
+/* $OpenBSD: pxa2x0_apm.c,v 1.43 2014/09/20 09:28:24 kettenis Exp $ */
/*-
* Copyright (c) 2001 Alexander Guy. All rights reserved.
@@ -306,7 +306,6 @@ apm_power_info(struct pxa2x0_apm_softc *sc,
void
apm_suspend(struct pxa2x0_apm_softc *sc)
{
- struct device *mainbus = device_mainbus();
int s;
#if NWSDISPLAY > 0
@@ -321,14 +320,14 @@ apm_suspend(struct pxa2x0_apm_softc *sc)
sc->sc_suspend(sc);
s = splhigh();
- config_suspend(mainbus, DVACT_SUSPEND);
+ config_suspend_all(DVACT_SUSPEND);
/* XXX
* Flag to disk drivers that they should "power down" the disk
* when we get to DVACT_POWERDOWN.
*/
boothowto |= RB_POWERDOWN;
- config_suspend(mainbus, DVACT_POWERDOWN);
+ config_suspend_all(DVACT_POWERDOWN);
boothowto &= ~RB_POWERDOWN;
splx(s);
@@ -339,11 +338,10 @@ apm_suspend(struct pxa2x0_apm_softc *sc)
void
apm_resume(struct pxa2x0_apm_softc *sc)
{
- struct device *mainbus = device_mainbus();
int s;
s = splhigh();
- config_suspend(mainbus, DVACT_RESUME);
+ config_suspend_all(DVACT_RESUME);
splx(s);
inittodr(0);
@@ -357,7 +355,7 @@ apm_resume(struct pxa2x0_apm_softc *sc)
bufq_restart();
- config_suspend(mainbus, DVACT_WAKEUP);
+ config_suspend_all(DVACT_WAKEUP);
#if NWSDISPLAY > 0
wsdisplay_resume();
diff --git a/sys/arch/armish/armish/armish_machdep.c b/sys/arch/armish/armish/armish_machdep.c
index ef68fe60777..d0a566282af 100644
--- a/sys/arch/armish/armish/armish_machdep.c
+++ b/sys/arch/armish/armish/armish_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: armish_machdep.c,v 1.31 2014/07/21 17:25:47 uebayasi Exp $ */
+/* $OpenBSD: armish_machdep.c,v 1.32 2014/09/20 09:28:24 kettenis Exp $ */
/* $NetBSD: lubbock_machdep.c,v 1.2 2003/07/15 00:25:06 lukem Exp $ */
/*
@@ -249,8 +249,6 @@ void board_powerdown(void);
__dead void
boot(int howto)
{
- struct device *mainbus;
-
if (cold) {
if ((howto & RB_USERREQ) == 0)
howto |= RB_HALT;
@@ -278,9 +276,7 @@ boot(int howto)
haltsys:
doshutdownhooks();
- mainbus = device_mainbus();
- if (mainbus != NULL)
- config_suspend(mainbus, DVACT_POWERDOWN);
+ config_suspend_all(DVACT_POWERDOWN);
/* Make sure IRQ's are disabled */
IRQdisable;
diff --git a/sys/arch/armv7/armv7/armv7_machdep.c b/sys/arch/armv7/armv7/armv7_machdep.c
index 803de690670..994ae3d0bb1 100644
--- a/sys/arch/armv7/armv7/armv7_machdep.c
+++ b/sys/arch/armv7/armv7/armv7_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: armv7_machdep.c,v 1.14 2014/07/21 17:25:47 uebayasi Exp $ */
+/* $OpenBSD: armv7_machdep.c,v 1.15 2014/09/20 09:28:24 kettenis Exp $ */
/* $NetBSD: lubbock_machdep.c,v 1.2 2003/07/15 00:25:06 lukem Exp $ */
/*
@@ -245,18 +245,14 @@ int comcnmode = CONMODE;
__dead void
boot(int howto)
{
- struct device *mainbus;
#ifdef DIAGNOSTIC
/* info */
printf("boot: howto=%08x curproc=%p\n", howto, curproc);
#endif
- mainbus = device_mainbus();
-
if (cold) {
doshutdownhooks();
- if (mainbus != NULL)
- config_suspend(mainbus, DVACT_POWERDOWN);
+ config_suspend_all(DVACT_POWERDOWN);
if ((howto & (RB_HALT | RB_USERREQ)) != RB_USERREQ) {
printf("The operating system has halted.\n");
printf("Please press any key to reboot.\n\n");
@@ -293,8 +289,7 @@ boot(int howto)
dumpsys();
doshutdownhooks();
- if (mainbus != NULL)
- config_suspend(mainbus, DVACT_POWERDOWN);
+ config_suspend_all(DVACT_POWERDOWN);
/* Make sure IRQ's are disabled */
IRQdisable;
diff --git a/sys/arch/aviion/aviion/machdep.c b/sys/arch/aviion/aviion/machdep.c
index 8735ca2fe32..4073c657285 100644
--- a/sys/arch/aviion/aviion/machdep.c
+++ b/sys/arch/aviion/aviion/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.71 2014/07/21 17:25:47 uebayasi Exp $ */
+/* $OpenBSD: machdep.c,v 1.72 2014/09/20 09:28:24 kettenis Exp $ */
/*
* Copyright (c) 2007 Miodrag Vallat.
*
@@ -294,8 +294,6 @@ doboot()
__dead void
boot(int howto)
{
- struct device *mainbus;
-
if (curproc && curproc->p_addr)
savectx(curpcb);
@@ -326,9 +324,7 @@ boot(int howto)
haltsys:
doshutdownhooks();
- mainbus = device_mainbus();
- if (mainbus != NULL)
- config_suspend(mainbus, DVACT_POWERDOWN);
+ config_suspend_all(DVACT_POWERDOWN);
if ((howto & RB_HALT) != 0) {
printf("System halted.\n\n");
diff --git a/sys/arch/landisk/landisk/machdep.c b/sys/arch/landisk/landisk/machdep.c
index 6056240da89..83387eaf70b 100644
--- a/sys/arch/landisk/landisk/machdep.c
+++ b/sys/arch/landisk/landisk/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.40 2014/07/21 17:25:47 uebayasi Exp $ */
+/* $OpenBSD: machdep.c,v 1.41 2014/09/20 09:28:24 kettenis Exp $ */
/* $NetBSD: machdep.c,v 1.1 2006/09/01 21:26:18 uwe Exp $ */
/*-
@@ -193,8 +193,6 @@ landisk_startup(int howto, char *_esym)
__dead void
boot(int howto)
{
- struct device *mainbus;
-
if (cold) {
if ((howto & RB_USERREQ) == 0)
howto |= RB_HALT;
@@ -222,9 +220,7 @@ boot(int howto)
haltsys:
doshutdownhooks();
- mainbus = device_mainbus();
- if (mainbus != NULL)
- config_suspend(mainbus, DVACT_POWERDOWN);
+ config_suspend_all(DVACT_POWERDOWN);
if ((howto & RB_POWERDOWN) != 0) {
_reg_write_1(LANDISK_PWRMNG, PWRMNG_POWEROFF);
diff --git a/sys/arch/loongson/dev/apm.c b/sys/arch/loongson/dev/apm.c
index 4693d4cf18d..d5e9a6a595d 100644
--- a/sys/arch/loongson/dev/apm.c
+++ b/sys/arch/loongson/dev/apm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: apm.c,v 1.23 2014/07/19 18:01:23 pirofti Exp $ */
+/* $OpenBSD: apm.c,v 1.24 2014/09/20 09:28:24 kettenis Exp $ */
/*-
* Copyright (c) 2001 Alexander Guy. All rights reserved.
@@ -365,7 +365,6 @@ apm_record_event(u_int event, const char *src, const char *msg)
int
apm_suspend(int state)
{
- struct device *mainbus = device_mainbus();
int rv;
int s;
@@ -375,14 +374,14 @@ apm_suspend(int state)
resettodr();
- config_suspend(mainbus, DVACT_QUIESCE);
+ config_suspend_all(DVACT_QUIESCE);
bufq_quiesce();
s = splhigh();
(void)disableintr();
cold = 1;
- rv = config_suspend(mainbus, DVACT_SUSPEND);
+ rv = config_suspend_all(DVACT_SUSPEND);
#ifdef HIBERNATE
if (state == APM_IOC_HIBERNATE) {
@@ -401,7 +400,7 @@ apm_suspend(int state)
* when we get to DVACT_POWERDOWN.
*/
boothowto |= RB_POWERDOWN;
- (void) config_suspend(mainbus, DVACT_POWERDOWN);
+ config_suspend_all(DVACT_POWERDOWN);
boothowto &= ~RB_POWERDOWN;
if (rv == 0) {
@@ -410,7 +409,7 @@ apm_suspend(int state)
rv = sys_platform->resume();
}
inittodr(time_second); /* Move the clock forward */
- config_suspend(mainbus, DVACT_RESUME);
+ config_suspend_all(DVACT_RESUME);
cold = 0;
(void)enableintr();
@@ -418,7 +417,7 @@ apm_suspend(int state)
bufq_restart();
- config_suspend(mainbus, DVACT_WAKEUP);
+ config_suspend_all(DVACT_WAKEUP);
#if NWSDISPLAY > 0
wsdisplay_resume();
diff --git a/sys/arch/loongson/loongson/machdep.c b/sys/arch/loongson/loongson/machdep.c
index 584ba772985..cc589edc4c3 100644
--- a/sys/arch/loongson/loongson/machdep.c
+++ b/sys/arch/loongson/loongson/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.58 2014/07/21 17:25:47 uebayasi Exp $ */
+/* $OpenBSD: machdep.c,v 1.59 2014/09/20 09:28:24 kettenis Exp $ */
/*
* Copyright (c) 2009, 2010, 2014 Miodrag Vallat.
@@ -902,8 +902,6 @@ int waittime = -1;
__dead void
boot(int howto)
{
- struct device *mainbus;
-
if (curproc)
savectx(curproc->p_addr, 0);
@@ -935,11 +933,8 @@ boot(int howto)
haltsys:
doshutdownhooks();
- mainbus = device_mainbus();
- if (mainbus != NULL) {
- pci_dopm = 0;
- config_suspend(mainbus, DVACT_POWERDOWN);
- }
+ pci_dopm = 0;
+ config_suspend_all(DVACT_POWERDOWN);
if ((howto & RB_HALT) != 0) {
if ((howto & RB_POWERDOWN) != 0) {
diff --git a/sys/arch/luna88k/luna88k/machdep.c b/sys/arch/luna88k/luna88k/machdep.c
index 05dbd012b93..15b8ce2fec5 100644
--- a/sys/arch/luna88k/luna88k/machdep.c
+++ b/sys/arch/luna88k/luna88k/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.108 2014/07/21 17:25:47 uebayasi Exp $ */
+/* $OpenBSD: machdep.c,v 1.109 2014/09/20 09:28:24 kettenis Exp $ */
/*
* Copyright (c) 1998, 1999, 2000, 2001 Steve Murphree, Jr.
* Copyright (c) 1996 Nivas Madhur
@@ -468,8 +468,6 @@ cpu_startup()
__dead void
boot(int howto)
{
- struct device *mainbus;
-
if (curproc && curproc->p_addr)
savectx(curpcb);
@@ -500,9 +498,7 @@ boot(int howto)
haltsys:
doshutdownhooks();
- mainbus = device_mainbus();
- if (mainbus != NULL)
- config_suspend(mainbus, DVACT_POWERDOWN);
+ config_suspend_all(DVACT_POWERDOWN);
/* LUNA-88K supports automatic powerdown */
if ((howto & RB_POWERDOWN) != 0) {
diff --git a/sys/arch/octeon/octeon/machdep.c b/sys/arch/octeon/octeon/machdep.c
index f9e689b0ab9..2d89462c335 100644
--- a/sys/arch/octeon/octeon/machdep.c
+++ b/sys/arch/octeon/octeon/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.61 2014/08/11 18:56:49 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.62 2014/09/20 09:28:24 kettenis Exp $ */
/*
* Copyright (c) 2009, 2010 Miodrag Vallat.
@@ -665,8 +665,6 @@ int waittime = -1;
__dead void
boot(int howto)
{
- struct device *mainbus;
-
if (curproc)
savectx(curproc->p_addr, 0);
@@ -698,9 +696,7 @@ boot(int howto)
haltsys:
doshutdownhooks();
- mainbus = device_mainbus();
- if (mainbus != NULL)
- config_suspend(mainbus, DVACT_POWERDOWN);
+ config_suspend_all(DVACT_POWERDOWN);
if ((howto & RB_HALT) != 0) {
if ((howto & RB_POWERDOWN) != 0)
diff --git a/sys/arch/sgi/sgi/machdep.c b/sys/arch/sgi/sgi/machdep.c
index 71884fc5f99..6cd7ea371df 100644
--- a/sys/arch/sgi/sgi/machdep.c
+++ b/sys/arch/sgi/sgi/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.148 2014/07/21 17:25:47 uebayasi Exp $ */
+/* $OpenBSD: machdep.c,v 1.149 2014/09/20 09:28:24 kettenis Exp $ */
/*
* Copyright (c) 2003-2004 Opsycon AB (www.opsycon.se / www.opsycon.com)
@@ -829,8 +829,6 @@ int waittime = -1;
__dead void
boot(int howto)
{
- struct device *mainbus;
-
if (curproc)
savectx(curproc->p_addr, 0);
@@ -862,9 +860,7 @@ boot(int howto)
haltsys:
doshutdownhooks();
- mainbus = device_mainbus();
- if (mainbus != NULL)
- config_suspend(mainbus, DVACT_POWERDOWN);
+ config_suspend_all(DVACT_POWERDOWN);
if ((howto & RB_HALT) != 0) {
if ((howto & RB_POWERDOWN) != 0)
diff --git a/sys/arch/solbourne/solbourne/machdep.c b/sys/arch/solbourne/solbourne/machdep.c
index e0ae61fae7a..9e80bb88d12 100644
--- a/sys/arch/solbourne/solbourne/machdep.c
+++ b/sys/arch/solbourne/solbourne/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.42 2014/07/21 17:25:47 uebayasi Exp $ */
+/* $OpenBSD: machdep.c,v 1.43 2014/09/20 09:28:24 kettenis Exp $ */
/* OpenBSD: machdep.c,v 1.105 2005/04/11 15:13:01 deraadt Exp */
/*
@@ -518,7 +518,6 @@ boot(int howto)
{
int i;
static char str[4]; /* room for "-sd\0" */
- struct device *mainbus;
if (cold) {
if ((howto & RB_USERREQ) == 0)
@@ -549,9 +548,7 @@ boot(int howto)
haltsys:
doshutdownhooks();
- mainbus = device_mainbus();
- if (mainbus != NULL)
- config_suspend(mainbus, DVACT_POWERDOWN);
+ config_suspend_all(DVACT_POWERDOWN);
if ((howto & RB_HALT) != 0 || (howto & RB_POWERDOWN) != 0) {
printf("halted\n\n");
diff --git a/sys/arch/sparc/sparc/machdep.c b/sys/arch/sparc/sparc/machdep.c
index 2f12ff2f840..997b3a76f60 100644
--- a/sys/arch/sparc/sparc/machdep.c
+++ b/sys/arch/sparc/sparc/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.164 2014/07/21 17:25:47 uebayasi Exp $ */
+/* $OpenBSD: machdep.c,v 1.165 2014/09/20 09:28:24 kettenis Exp $ */
/* $NetBSD: machdep.c,v 1.85 1997/09/12 08:55:02 pk Exp $ */
/*
@@ -527,7 +527,6 @@ boot(int howto)
{
int i;
static char str[4]; /* room for "-sd\0" */
- struct device *mainbus;
if (cold) {
if ((howto & RB_USERREQ) == 0)
@@ -558,9 +557,7 @@ boot(int howto)
haltsys:
doshutdownhooks();
- mainbus = device_mainbus();
- if (mainbus != NULL)
- config_suspend(mainbus, DVACT_POWERDOWN);
+ config_suspend_all(DVACT_POWERDOWN);
if ((howto & RB_HALT) != 0 || (howto & RB_POWERDOWN) != 0) {
#if defined(SUN4M)
diff --git a/sys/arch/vax/vax/machdep.c b/sys/arch/vax/vax/machdep.c
index 68bcd968f6b..7705426e3f8 100644
--- a/sys/arch/vax/vax/machdep.c
+++ b/sys/arch/vax/vax/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.143 2014/07/21 17:25:47 uebayasi Exp $ */
+/* $OpenBSD: machdep.c,v 1.144 2014/09/20 09:28:24 kettenis Exp $ */
/* $NetBSD: machdep.c,v 1.108 2000/09/13 15:00:23 thorpej Exp $ */
/*
@@ -511,8 +511,6 @@ static volatile int showto; /* Must be volatile to survive MM on -> MM off */
__dead void
boot(int howto)
{
- struct device *mainbus;
-
if (cold) {
if ((howto & RB_USERREQ) == 0)
howto |= RB_HALT;
@@ -540,9 +538,7 @@ boot(int howto)
haltsys:
doshutdownhooks();
- mainbus = device_mainbus();
- if (mainbus != NULL)
- config_suspend(mainbus, DVACT_POWERDOWN);
+ config_suspend_all(DVACT_POWERDOWN);
if ((howto & RB_HALT) != 0) {
if (dep_call->cpu_halt)
diff --git a/sys/arch/zaurus/dev/zaurus_apm.c b/sys/arch/zaurus/dev/zaurus_apm.c
index f9f5eb656d7..16bad432c87 100644
--- a/sys/arch/zaurus/dev/zaurus_apm.c
+++ b/sys/arch/zaurus/dev/zaurus_apm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: zaurus_apm.c,v 1.27 2014/07/08 17:19:25 deraadt Exp $ */
+/* $OpenBSD: zaurus_apm.c,v 1.28 2014/09/20 09:28:24 kettenis Exp $ */
/*
* Copyright (c) 2005 Uwe Stuehler <uwe@bsdx.de>
@@ -571,7 +571,7 @@ zapm_suspend(struct pxa2x0_apm_softc *pxa_sc)
{
struct zapm_softc *sc = (struct zapm_softc *)pxa_sc;
- config_suspend(device_mainbus(), DVACT_QUIESCE);
+ config_suspend_all(DVACT_QUIESCE);
bufq_quiesce();
/* Poll in suspended mode and forget the discharge timeout. */
@@ -644,7 +644,6 @@ zapm_resume(struct pxa2x0_apm_softc *pxa_sc)
void
zapm_poweroff(void)
{
- struct device *mainbus = device_mainbus();
struct pxa2x0_apm_softc *sc;
int s;
@@ -656,14 +655,14 @@ zapm_poweroff(void)
#endif /* NWSDISPLAY > 0 */
s = splhigh();
- config_suspend(mainbus, DVACT_SUSPEND);
+ config_suspend_all(DVACT_SUSPEND);
/* XXX
* Flag to disk drivers that they should "power down" the disk
* when we get to DVACT_POWERDOWN.
*/
boothowto |= RB_POWERDOWN;
- config_suspend(mainbus, DVACT_POWERDOWN);
+ config_suspend_all(DVACT_POWERDOWN);
boothowto &= ~RB_POWERDOWN;
/* XXX enable charging during suspend */
@@ -685,12 +684,12 @@ zapm_poweroff(void)
zapm_restart();
/* NOTREACHED */
- config_suspend(mainbus, DVACT_RESUME);
+ config_suspend_all(DVACT_RESUME);
splx(s);
bufq_restart();
- config_suspend(mainbus, DVACT_WAKEUP);
+ config_suspend_all(DVACT_WAKEUP);
#if NWSDISPLAY > 0
wsdisplay_resume();
diff --git a/sys/arch/zaurus/zaurus/zaurus_machdep.c b/sys/arch/zaurus/zaurus/zaurus_machdep.c
index 60c96d83b64..9a99de421e8 100644
--- a/sys/arch/zaurus/zaurus/zaurus_machdep.c
+++ b/sys/arch/zaurus/zaurus/zaurus_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: zaurus_machdep.c,v 1.51 2014/07/21 17:25:47 uebayasi Exp $ */
+/* $OpenBSD: zaurus_machdep.c,v 1.52 2014/09/20 09:28:25 kettenis Exp $ */
/* $NetBSD: lubbock_machdep.c,v 1.2 2003/07/15 00:25:06 lukem Exp $ */
/*
@@ -292,7 +292,6 @@ int comcnmode = CONMODE;
__dead void
boot(int howto)
{
- struct device *mainbus;
extern int lid_suspend;
if ((howto & RB_POWERDOWN) != 0)
@@ -325,9 +324,7 @@ boot(int howto)
haltsys:
doshutdownhooks();
- mainbus = device_mainbus();
- if (mainbus != NULL)
- config_suspend(mainbus, DVACT_POWERDOWN);
+ config_suspend_all(DVACT_POWERDOWN);
/* Make sure IRQ's are disabled */
IRQdisable;