Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-7]: src/sys/arch/arm/broadcom Pull up following revision(s) (requ...
details: https://anonhg.NetBSD.org/src/rev/4f869eefac54
branches: netbsd-7
changeset: 798340:4f869eefac54
user: martin <martin%NetBSD.org@localhost>
date: Thu Sep 11 13:46:49 2014 +0000
description:
Pull up following revision(s) (requested by skrll in ticket #90):
sys/arch/arm/broadcom/bcm2835_bsc.c: revision 1.3
Initialise bsciichist only once, otherwise the kern_histories list
never ends.
diffstat:
sys/arch/arm/broadcom/bcm2835_bsc.c | 24 +++++++++++++++++-------
1 files changed, 17 insertions(+), 7 deletions(-)
diffs (70 lines):
diff -r a7dc125e42f0 -r 4f869eefac54 sys/arch/arm/broadcom/bcm2835_bsc.c
--- a/sys/arch/arm/broadcom/bcm2835_bsc.c Thu Sep 11 13:41:57 2014 +0000
+++ b/sys/arch/arm/broadcom/bcm2835_bsc.c Thu Sep 11 13:46:49 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bcm2835_bsc.c,v 1.2 2014/03/20 05:39:11 ozaki-r Exp $ */
+/* $NetBSD: bcm2835_bsc.c,v 1.2.4.1 2014/09/11 13:46:49 martin Exp $ */
/*
* Copyright (c) 2012 Jonathan A. Kollasch
@@ -27,14 +27,15 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bcm2835_bsc.c,v 1.2 2014/03/20 05:39:11 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bcm2835_bsc.c,v 1.2.4.1 2014/09/11 13:46:49 martin Exp $");
#include <sys/param.h>
+#include <sys/bus.h>
#include <sys/device.h>
-#include <sys/systm.h>
+#include <sys/intr.h>
#include <sys/mutex.h>
-#include <sys/bus.h>
-#include <sys/intr.h>
+#include <sys/once.h>
+#include <sys/systm.h>
#include <dev/i2c/i2cvar.h>
@@ -48,7 +49,6 @@
#endif
#include <sys/kernhist.h>
-KERNHIST_DECL(bsciichist);
KERNHIST_DEFINE(bsciichist);
struct bsciic_softc {
@@ -75,6 +75,15 @@
bsciic_match, bsciic_attach, NULL, NULL);
static int
+bsciic_init(void)
+{
+
+ KERNHIST_INIT(bsciichist, 512);
+
+ return 0;
+}
+
+static int
bsciic_match(device_t parent, cfdata_t match, void *aux)
{
struct amba_attach_args * const aaa = aux;
@@ -92,6 +101,7 @@
struct amba_attach_args * const aaa = aux;
struct i2cbus_attach_args iba;
u_int bscunit = ~0;
+ static ONCE_DECL(control);
switch (aaa->aaa_addr) {
case BCM2835_BSC0_BASE:
@@ -105,7 +115,7 @@
aprint_naive("\n");
aprint_normal(": BSC%u\n", bscunit);
- KERNHIST_INIT(bsciichist, 512);
+ RUN_ONCE(&control, bsciic_init);
sc->sc_dev = self;
Home |
Main Index |
Thread Index |
Old Index