Static initialise usbhist - it can be used by controller drivers, i.e.
before usb attaches.
This commit is contained in:
parent
92795cceb3
commit
8735b6f026
|
@ -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.156 2014/09/12 16:40:38 skrll Exp $");
|
|||
|
||||
#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");
|
||||
|
|
Loading…
Reference in New Issue