/* $NetBSD$ */ /* * Copyright (c) 2012 Matthew R. Green * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _DEV_USB_USB_HIST_H_ #define _DEV_USB_USB_HIST_H_ #if defined(_KERNEL_OPT) #include "opt_usbhist.h" #include "opt_kernhist.h" #endif /* * Make USBHIST_PRINT force on KERNHIST_PRINT for at least USBHIST_* usage. */ #if defined(USBHIST_PRINT) && !defined(KERNHIST_PRINT) #define KERNHIST_PRINT 1 #endif #include #ifdef USBHIST #define USBHIST_DECL(NAME) KERNHIST_DECL(NAME) #define USBHIST_INIT(NAME,N) KERNHIST_INIT(NAME,N) #define USBHIST_INIT_STATIC(NAME,BUF) KERNHIST_INIT_STATIC(NAME,BUF) #define USBHIST_LOG(NAME,FMT,A,B,C,D) KERNHIST_LOG(NAME,FMT,A,B,C,D) #define USBHIST_CALLED(NAME) KERNHIST_CALLED(NAME) #define USBHIST_FUNC() KERNHIST_FUNC(__func__) extern USBHIST_DECL(usbxferhist); #else #define USBHIST_DECL(NAME) #define USBHIST_INIT(NAME,N) #define USBHIST_INIT_STATIC(NAME,BUF) #define USBHIST_LOG(NAME,FMT,A,B,C,D) #define USBHIST_CALLED(NAME) #define USBHIST_FUNC() #endif #endif /* _DEV_USB_USB_HIST_H_ */