Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/sparc/dev Initialise the mutex before we use it.
details: https://anonhg.NetBSD.org/src/rev/72eba8a89a71
branches: trunk
changeset: 972882:72eba8a89a71
user: jdc <jdc%NetBSD.org@localhost>
date: Sat Jun 13 05:31:28 2020 +0000
description:
Initialise the mutex before we use it.
diffstat:
sys/arch/sparc/dev/tctrl.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diffs (35 lines):
diff -r 41ac1d9337ef -r 72eba8a89a71 sys/arch/sparc/dev/tctrl.c
--- a/sys/arch/sparc/dev/tctrl.c Sat Jun 13 01:41:59 2020 +0000
+++ b/sys/arch/sparc/dev/tctrl.c Sat Jun 13 05:31:28 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tctrl.c,v 1.61 2017/10/25 08:12:37 maya Exp $ */
+/* $NetBSD: tctrl.c,v 1.62 2020/06/13 05:31:28 jdc Exp $ */
/*-
* Copyright (c) 1998, 2005, 2006 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tctrl.c,v 1.61 2017/10/25 08:12:37 maya Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tctrl.c,v 1.62 2020/06/13 05:31:28 jdc Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -260,6 +260,8 @@
sc->sc_tft_on = 1;
+ mutex_init(&sc->sc_requestlock, MUTEX_DEFAULT, IPL_NONE);
+
/* clear any pending data.
*/
for (i = 0; i < 10000; i++) {
@@ -312,7 +314,6 @@
sc->sc_ext_pending = 0;
sc->sc_ext_pending = 0;
- mutex_init(&sc->sc_requestlock, MUTEX_DEFAULT, IPL_NONE);
selinit(&sc->sc_rsel);
/* setup sensors and register the power button */
Home |
Main Index |
Thread Index |
Old Index