Module Name: src Committed By: jakllsch Date: Thu May 26 02:37:25 UTC 2011
Modified Files: src/sys/dev/ic: atppc.c Log Message: Convert malloc(9) to kmem(9) in atppc(4). (Intended to have been part of previous commit.) To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.30 src/sys/dev/ic/atppc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/ic/atppc.c diff -u src/sys/dev/ic/atppc.c:1.29 src/sys/dev/ic/atppc.c:1.30 --- src/sys/dev/ic/atppc.c:1.29 Thu May 26 02:29:23 2011 +++ src/sys/dev/ic/atppc.c Thu May 26 02:37:25 2011 @@ -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;