Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/ic Convert malloc(9) to kmem(9) in atppc(4).
details: https://anonhg.NetBSD.org/src/rev/16c8d6410962
branches: trunk
changeset: 765420:16c8d6410962
user: jakllsch <jakllsch%NetBSD.org@localhost>
date: Thu May 26 02:37:25 2011 +0000
description:
Convert malloc(9) to kmem(9) in atppc(4).
(Intended to have been part of previous commit.)
diffstat:
sys/dev/ic/atppc.c | 11 +++++------
1 files changed, 5 insertions(+), 6 deletions(-)
diffs (46 lines):
diff -r 874485bf77f7 -r 16c8d6410962 sys/dev/ic/atppc.c
--- a/sys/dev/ic/atppc.c Thu May 26 02:29:23 2011 +0000
+++ b/sys/dev/ic/atppc.c Thu May 26 02:37:25 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: atppc.c,v 1.29 2011/05/26 02:29:23 jakllsch Exp $ */
+/* $NetBSD: atppc.c,v 1.30 2011/05/26 02:37:25 jakllsch Exp $ */
/*
* Copyright (c) 2001 Alcove - Nicolas Souchu
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: atppc.c,v 1.29 2011/05/26 02:29:23 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: atppc.c,v 1.30 2011/05/26 02:37:25 jakllsch Exp $");
#include "opt_atppc.h"
@@ -39,7 +39,7 @@
#include <sys/param.h>
#include <sys/kernel.h>
#include <sys/device.h>
-#include <sys/malloc.h>
+#include <sys/kmem.h>
#include <sys/proc.h>
#include <sys/systm.h>
#include <sys/vnode.h>
@@ -1551,8 +1551,7 @@
__func__, device_xname(dev)));
rval = EINVAL;
} else {
- callback = malloc(sizeof(struct atppc_handler_node), M_DEVBUF,
- M_NOWAIT);
+ callback = kmem_alloc(sizeof(*callback), KM_SLEEP);
if (callback) {
callback->func = handler;
callback->arg = arg;
@@ -1595,7 +1594,7 @@
mutex_exit(&atppc->sc_lock);
if (rval == 0) {
- free(callback, M_DEVBUF);
+ kmem_free(callback, sizeof(*callback));
}
return rval;
Home |
Main Index |
Thread Index |
Old Index