Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/nvidia PR/50963: David Binderman: Use kmem_zall...
details: https://anonhg.NetBSD.org/src/rev/b0d5691f1ba7
branches: trunk
changeset: 344116:b0d5691f1ba7
user: christos <christos%NetBSD.org@localhost>
date: Sun Mar 13 17:38:44 2016 +0000
description:
PR/50963: David Binderman: Use kmem_zalloc() so all members are initialized.
diffstat:
sys/arch/arm/nvidia/tegra_gpio.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r b0624cff0232 -r b0d5691f1ba7 sys/arch/arm/nvidia/tegra_gpio.c
--- a/sys/arch/arm/nvidia/tegra_gpio.c Sun Mar 13 17:26:05 2016 +0000
+++ b/sys/arch/arm/nvidia/tegra_gpio.c Sun Mar 13 17:38:44 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra_gpio.c,v 1.6 2015/12/22 22:19:07 jmcneill Exp $ */
+/* $NetBSD: tegra_gpio.c,v 1.7 2016/03/13 17:38:44 christos Exp $ */
/*-
* Copyright (c) 2015 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tegra_gpio.c,v 1.6 2015/12/22 22:19:07 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tegra_gpio.c,v 1.7 2016/03/13 17:38:44 christos Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -303,7 +303,7 @@
if ((cnf & __BIT(pin)) == 0)
GPIO_WRITE(&gbank, GPIO_CNF_REG, cnf | __BIT(pin));
- gpin = kmem_alloc(sizeof(*gpin), KM_SLEEP);
+ gpin = kmem_zalloc(sizeof(*gpin), KM_SLEEP);
gpin->pin_bank = gbank;
gpin->pin_no = pin;
gpin->pin_flags = flags;
Home |
Main Index |
Thread Index |
Old Index