diff --git a/sys/conf/options b/sys/conf/options index b124820ba9f0..e593c04306ae 100644 --- a/sys/conf/options +++ b/sys/conf/options @@ -644,6 +644,7 @@ BUS_DEBUG opt_bus.h USB_DEBUG opt_usb.h USB_HOST_ALIGN opt_usb.h USB_REQ_DEBUG opt_usb.h +USB_TEMPLATE opt_usb.h USB_VERBOSE opt_usb.h USB_EHCI_BIG_ENDIAN_DESC opt_usb.h U3G_DEBUG opt_u3g.h diff --git a/sys/dev/usb/usb_device.c b/sys/dev/usb/usb_device.c index cc3511239570..9fa0e5cf3cf2 100644 --- a/sys/dev/usb/usb_device.c +++ b/sys/dev/usb/usb_device.c @@ -112,7 +112,11 @@ static void usb_cdev_free(struct usb_device *); /* This variable is global to allow easy access to it: */ -int usb_template = 0; +#ifdef USB_TEMPLATE +int usb_template = USB_TEMPLATE; +#else +int usb_template; +#endif TUNABLE_INT("hw.usb.usb_template", &usb_template); SYSCTL_INT(_hw_usb, OID_AUTO, template, CTLFLAG_RW | CTLFLAG_TUN,