summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb
diff options
context:
space:
mode:
authorluigi <luigi@FreeBSD.org>2007-01-03 10:50:03 +0000
committerluigi <luigi@FreeBSD.org>2007-01-03 10:50:03 +0000
commit945b2641394424c349501740142e494f5577ec61 (patch)
treed438f2b9d9efcd1f5c507ada82cfe6d02d3ac187 /sys/dev/usb
parent1b31fff9386d0af6160b1b5079a4a667802ebb4e (diff)
downloadFreeBSD-src-945b2641394424c349501740142e494f5577ec61.zip
FreeBSD-src-945b2641394424c349501740142e494f5577ec61.tar.gz
protect against multiple inclusion (this is useful when you
start working with third party usb modules, where sometimes it is not easy to set the inclusion order so that there are no multiple inclusions, yet you want to compile with high WARNS levels). I am not sure if there is a standard for having a leading and/or trailing _ in the macro name, the usb code seems to use both. There are still several unprotected headers here so it might be useful to do the same thing on other files as well as the need arises. MFC After: 3 days
Diffstat (limited to 'sys/dev/usb')
-rw-r--r--sys/dev/usb/usbdi_util.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/dev/usb/usbdi_util.h b/sys/dev/usb/usbdi_util.h
index 7f659fa..b535f0c 100644
--- a/sys/dev/usb/usbdi_util.h
+++ b/sys/dev/usb/usbdi_util.h
@@ -38,6 +38,8 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
+#ifndef _USBI_UTIL_H_
+#define _USBI_UTIL_H_
usbd_status usbd_get_desc(usbd_device_handle dev, int type,
int index, int len, void *desc);
usbd_status usbd_get_config_desc(usbd_device_handle, int,
@@ -93,3 +95,4 @@ const usb_descriptor_t *usb_find_desc(usbd_device_handle dev, int type,
int subtype);
#define USBD_SUBTYPE_ANY (~0)
+#endif /* _USBI_UTIL_H_ */
OpenPOWER on IntegriCloud