Module Name:    src
Committed By:   skrll
Date:           Thu May 28 09:06:36 UTC 2015

Modified Files:
        src/sys/dev/usb: usb.c

Log Message:
Static initialise usbhist - it can be used by controller drivers, i.e.
before usb attaches.


To generate a diff of this commit:
cvs rdiff -u -r1.156 -r1.157 src/sys/dev/usb/usb.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/dev/usb/usb.c
diff -u src/sys/dev/usb/usb.c:1.156 src/sys/dev/usb/usb.c:1.157
--- src/sys/dev/usb/usb.c:1.156	Fri Sep 12 16:40:38 2014
+++ src/sys/dev/usb/usb.c	Thu May 28 09:06:36 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: usb.c,v 1.156 2014/09/12 16:40:38 skrll Exp $	*/
+/*	$NetBSD: usb.c,v 1.157 2015/05/28 09:06:36 skrll Exp $	*/
 
 /*
  * Copyright (c) 1998, 2002, 2008, 2012 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: usb.c,v 1.156 2014/09/12 16:40:38 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: usb.c,v 1.157 2015/05/28 09:06:36 skrll Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -75,11 +75,13 @@ __KERNEL_RCSID(0, "$NetBSD: usb.c,v 1.15
 
 #if defined(USBHIST)
 
-USBHIST_DEFINE(usbhist);
 #ifndef USBHIST_SIZE
 #define USBHIST_SIZE 50000
 #endif
 
+static struct kern_history_ent usbhistbuf[USBHIST_SIZE];
+USBHIST_DEFINE(usbhist) = KERNHIST_INITIALIZER(usbhist, usbhistbuf);
+
 #endif
 
 #define USB_DEV_MINOR 255
@@ -275,8 +277,6 @@ usb_once_init(void)
 	struct usb_taskq *taskq;
 	int i;
 
-	USBHIST_INIT(usbhist, USBHIST_SIZE);
-
 	selinit(&usb_selevent);
 	mutex_init(&usb_event_lock, MUTEX_DEFAULT, IPL_NONE);
 	cv_init(&usb_event_cv, "usbrea");

Reply via email to