summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2007-02-28 22:30:56 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2007-02-28 22:30:56 +0000
commit8034b9b790bf42c71478af30fae69ec7a4224159 (patch)
tree4d3e79a0da3df496d73329d885d29964badee7c9 /sys
parent4734052c8224e5c779edeb2f66230ed0d369f0b7 (diff)
place types needed by usbdevs_data.h, directly into that file so that it
is consumable by anyone who includes it (matches idea in pcidevs)
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/usb/devlist2h.awk18
-rw-r--r--sys/dev/usb/usb_subr.c19
2 files changed, 18 insertions, 19 deletions
diff --git a/sys/dev/usb/devlist2h.awk b/sys/dev/usb/devlist2h.awk
index a360cb75895..e009547fa53 100644
--- a/sys/dev/usb/devlist2h.awk
+++ b/sys/dev/usb/devlist2h.awk
@@ -1,5 +1,5 @@
#! /usr/bin/awk -f
-# $OpenBSD: devlist2h.awk,v 1.8 2005/10/17 18:00:43 drahn Exp $
+# $OpenBSD: devlist2h.awk,v 1.9 2007/02/28 22:30:55 deraadt Exp $
# $NetBSD: devlist2h.awk,v 1.9 2001/01/18 20:28:22 jdolecek Exp $
#
# Copyright (c) 1995, 1996 Christopher G. Demetriou
@@ -175,6 +175,22 @@ END {
printf("\n") > dfile
+ printf("typedef u_int16_t usb_vendor_id_t;\n") > dfile
+ printf("typedef u_int16_t usb_product_id_t;\n\n") > dfile
+
+ printf("/*\n") > dfile
+ printf(" * Descriptions of known vendors and devices (\"products\").\n") > dfile
+ printf(" */\n") > dfile
+ printf("struct usb_known_vendor {\n") > dfile
+ printf(" usb_vendor_id_t vendor;\n") > dfile
+ printf(" char *vendorname;\n") > dfile
+ printf("};\n\n") > dfile
+
+ printf("struct usb_known_product {\n") > dfile
+ printf(" usb_vendor_id_t vendor;\n") > dfile
+ printf(" usb_product_id_t product;\n") > dfile
+ printf(" char *productname;\n") > dfile
+ printf("};\n\n") > dfile
printf("const struct usb_known_product usb_known_products[] = {\n") \
> dfile
for (i = 1; i <= nproducts; i++) {
diff --git a/sys/dev/usb/usb_subr.c b/sys/dev/usb/usb_subr.c
index 74ea79ea9e4..2cca9fd6015 100644
--- a/sys/dev/usb/usb_subr.c
+++ b/sys/dev/usb/usb_subr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: usb_subr.c,v 1.47 2006/07/17 05:24:16 miod Exp $ */
+/* $OpenBSD: usb_subr.c,v 1.48 2007/02/28 22:30:55 deraadt Exp $ */
/* $NetBSD: usb_subr.c,v 1.103 2003/01/10 11:19:13 augustss Exp $ */
/* $FreeBSD: src/sys/dev/usb/usb_subr.c,v 1.18 1999/11/17 22:33:47 n_hibma Exp $ */
@@ -82,23 +82,6 @@ Static usbd_status usbd_probe_and_attach(device_ptr_t,
Static u_int32_t usb_cookie_no = 0;
#ifdef USBVERBOSE
-typedef u_int16_t usb_vendor_id_t;
-typedef u_int16_t usb_product_id_t;
-
-/*
- * Descriptions of of known vendors and devices ("products").
- */
-struct usb_known_vendor {
- usb_vendor_id_t vendor;
- char *vendorname;
-};
-
-struct usb_known_product {
- usb_vendor_id_t vendor;
- usb_product_id_t product;
- char *productname;
-};
-
#include <dev/usb/usbdevs_data.h>
#endif /* USBVERBOSE */