Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/acpi Use KM_SLEEP.
details: https://anonhg.NetBSD.org/src/rev/d4c5d837ef47
branches: trunk
changeset: 780996:d4c5d837ef47
user: jruoho <jruoho%NetBSD.org@localhost>
date: Tue Aug 14 14:38:02 2012 +0000
description:
Use KM_SLEEP.
diffstat:
sys/dev/acpi/acpi.c | 6 +++---
sys/dev/acpi/acpi_wakedev.c | 6 +++---
sys/dev/acpi/wmi/wmi_acpi.c | 13 +++----------
3 files changed, 9 insertions(+), 16 deletions(-)
diffs (98 lines):
diff -r 29c347b1686b -r d4c5d837ef47 sys/dev/acpi/acpi.c
--- a/sys/dev/acpi/acpi.c Tue Aug 14 14:36:43 2012 +0000
+++ b/sys/dev/acpi/acpi.c Tue Aug 14 14:38:02 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi.c,v 1.253 2012/04/10 13:48:24 jruoho Exp $ */
+/* $NetBSD: acpi.c,v 1.254 2012/08/14 14:38:02 jruoho Exp $ */
/*-
* Copyright (c) 2003, 2007 The NetBSD Foundation, Inc.
@@ -100,7 +100,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.253 2012/04/10 13:48:24 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.254 2012/08/14 14:38:02 jruoho Exp $");
#include "opt_acpi.h"
#include "opt_pcifixup.h"
@@ -708,7 +708,7 @@
case ACPI_TYPE_THERMAL:
case ACPI_TYPE_POWER:
- ad = kmem_zalloc(sizeof(*ad), KM_NOSLEEP);
+ ad = kmem_zalloc(sizeof(*ad), KM_SLEEP);
if (ad == NULL)
return AE_NO_MEMORY;
diff -r 29c347b1686b -r d4c5d837ef47 sys/dev/acpi/acpi_wakedev.c
--- a/sys/dev/acpi/acpi_wakedev.c Tue Aug 14 14:36:43 2012 +0000
+++ b/sys/dev/acpi/acpi_wakedev.c Tue Aug 14 14:38:02 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_wakedev.c,v 1.24 2011/02/19 09:52:32 jruoho Exp $ */
+/* $NetBSD: acpi_wakedev.c,v 1.25 2012/08/14 14:38:02 jruoho Exp $ */
/*-
* Copyright (c) 2009, 2010, 2011 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi_wakedev.c,v 1.24 2011/02/19 09:52:32 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_wakedev.c,v 1.25 2012/08/14 14:38:02 jruoho Exp $");
#include <sys/param.h>
#include <sys/device.h>
@@ -127,7 +127,7 @@
goto out;
}
- ad->ad_wakedev = kmem_zalloc(sizeof(*ad->ad_wakedev), KM_NOSLEEP);
+ ad->ad_wakedev = kmem_zalloc(sizeof(*ad->ad_wakedev), KM_SLEEP);
if (ad->ad_wakedev == NULL)
return;
diff -r 29c347b1686b -r d4c5d837ef47 sys/dev/acpi/wmi/wmi_acpi.c
--- a/sys/dev/acpi/wmi/wmi_acpi.c Tue Aug 14 14:36:43 2012 +0000
+++ b/sys/dev/acpi/wmi/wmi_acpi.c Tue Aug 14 14:38:02 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: wmi_acpi.c,v 1.13 2011/07/17 02:46:01 jakllsch Exp $ */
+/* $NetBSD: wmi_acpi.c,v 1.14 2012/08/14 14:38:02 jruoho Exp $ */
/*-
* Copyright (c) 2009, 2010 Jukka Ruohonen <jruohonen%iki.fi@localhost>
@@ -27,7 +27,7 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wmi_acpi.c,v 1.13 2011/07/17 02:46:01 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wmi_acpi.c,v 1.14 2012/08/14 14:38:02 jruoho Exp $");
#include <sys/param.h>
#include <sys/device.h>
@@ -238,7 +238,7 @@
for (i = offset = 0; i < n; ++i) {
- if ((wmi = kmem_zalloc(sizeof(*wmi), KM_NOSLEEP)) == NULL)
+ if ((wmi = kmem_zalloc(sizeof(*wmi), KM_SLEEP)) == NULL)
goto fail;
(void)memcpy(&wmi->guid, obj->Buffer.Pointer + offset, siz);
@@ -265,16 +265,9 @@
{
struct wmi_t *wmi;
- if (SIMPLEQ_EMPTY(&sc->wmi_head) != 0)
- return;
-
while (SIMPLEQ_FIRST(&sc->wmi_head) != NULL) {
-
wmi = SIMPLEQ_FIRST(&sc->wmi_head);
SIMPLEQ_REMOVE_HEAD(&sc->wmi_head, wmi_link);
-
- KASSERT(wmi != NULL);
-
kmem_free(wmi, sizeof(*wmi));
}
}
Home |
Main Index |
Thread Index |
Old Index