Module Name:    src
Committed By:   skrll
Date:           Tue Sep 27 06:34:45 UTC 2022

Modified Files:
        src/sys/arch/arm/at91: at91cf.c

Log Message:
malloc -> kmem


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arm/at91/at91cf.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/arch/arm/at91/at91cf.c
diff -u src/sys/arch/arm/at91/at91cf.c:1.7 src/sys/arch/arm/at91/at91cf.c:1.8
--- src/sys/arch/arm/at91/at91cf.c:1.7	Sat Aug  7 16:18:43 2021
+++ src/sys/arch/arm/at91/at91cf.c	Tue Sep 27 06:34:44 2022
@@ -1,5 +1,5 @@
-/*	$Id: at91cf.c,v 1.7 2021/08/07 16:18:43 thorpej Exp $	*/
-/*	$NetBSD: at91cf.c,v 1.7 2021/08/07 16:18:43 thorpej Exp $	*/
+/*	$Id: at91cf.c,v 1.8 2022/09/27 06:34:44 skrll Exp $	*/
+/*	$NetBSD: at91cf.c,v 1.8 2022/09/27 06:34:44 skrll Exp $	*/
 
 /*
  * Copyright (c) 2007 Embedtronics Oy. All rights reserved.
@@ -30,12 +30,12 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: at91cf.c,v 1.7 2021/08/07 16:18:43 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: at91cf.c,v 1.8 2022/09/27 06:34:44 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
 #include <sys/kernel.h>
-#include <sys/malloc.h>
+#include <sys/kmem.h>
 #include <sys/device.h>
 #include <sys/kthread.h>
 #include <uvm/uvm_param.h>
@@ -174,7 +174,7 @@ at91cf_attach_common(device_t parent, de
 	printf("\n");
 
 	/* socket 0 */
-	ph = malloc(sizeof(struct at91cf_handle), M_DEVBUF, M_WAITOK|M_ZERO);
+	ph = kmem_zalloc(sizeof(*ph), KM_SLEEP);
 	sc->sc_ph = ph;
 	ph->ph_sc = sc;
 	ph->ph_space[IO].base = sa->sa_addr + IO_BASE;

Reply via email to