summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorthorpej <thorpej@NetBSD.org>2022-09-17 16:42:38 +0000
committerthorpej <thorpej@NetBSD.org>2022-09-17 16:42:38 +0000
commit3d7672b8d6e047b2fba131726f54ea5be65e835b (patch)
tree9039f02733cd4247537c0d02ebf9d9f9b307f9b8 /sys/dev
parent673f0c0e70199e6457145780dff9167199973cf9 (diff)
malloc() -> kmem_alloc()
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/isa/if_eg.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/dev/isa/if_eg.c b/sys/dev/isa/if_eg.c
index 77910e095ac..05f3f07485d 100644
--- a/sys/dev/isa/if_eg.c
+++ b/sys/dev/isa/if_eg.c
@@ -1,4 +1,4 @@
-/* $NetBSD: if_eg.c,v 1.97 2020/01/29 06:21:40 thorpej Exp $ */
+/* $NetBSD: if_eg.c,v 1.98 2022/09/17 16:42:38 thorpej Exp $ */
/*
* Copyright (c) 1993 Dean Huxley <dean@fsa.ca>
@@ -40,12 +40,13 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_eg.c,v 1.97 2020/01/29 06:21:40 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_eg.c,v 1.98 2022/09/17 16:42:38 thorpej Exp $");
#include "opt_inet.h"
#include <sys/param.h>
#include <sys/systm.h>
+#include <sys/kmem.h>
#include <sys/mbuf.h>
#include <sys/socket.h>
#include <sys/ioctl.h>
@@ -496,7 +497,7 @@ eginit(struct eg_softc *sc)
aprint_error_dev(sc->sc_dev,"configure card command failed\n");
if (sc->eg_inbuf == NULL) {
- sc->eg_inbuf = malloc(EG_BUFLEN, M_TEMP, M_NOWAIT);
+ sc->eg_inbuf = kmem_alloc(EG_BUFLEN, KM_NOSLEEP);
if (sc->eg_inbuf == NULL) {
aprint_error_dev(sc->sc_dev, "can't allocate inbuf\n");
panic("eginit");
@@ -505,7 +506,7 @@ eginit(struct eg_softc *sc)
sc->eg_incount = 0;
if (sc->eg_outbuf == NULL) {
- sc->eg_outbuf = malloc(EG_BUFLEN, M_TEMP, M_NOWAIT);
+ sc->eg_outbuf = kmem_alloc(EG_BUFLEN, KM_NOSLEEP);
if (sc->eg_outbuf == NULL) {
aprint_error_dev(sc->sc_dev,"can't allocate outbuf\n");
panic("eginit");