diff options
author | n_hibma <n_hibma@FreeBSD.org> | 2000-07-05 08:11:43 +0000 |
---|---|---|
committer | n_hibma <n_hibma@FreeBSD.org> | 2000-07-05 08:11:43 +0000 |
commit | 7a141daf1445bf6f5b87de700923f8478baf1386 (patch) | |
tree | fe1b925608da709dc8e496814ee7cee2b2463647 /sys/dev/usb | |
parent | b6e74b58eba2989cf8de48058f7f988f58920981 (diff) | |
download | FreeBSD-src-7a141daf1445bf6f5b87de700923f8478baf1386.zip FreeBSD-src-7a141daf1445bf6f5b87de700923f8478baf1386.tar.gz |
Use the packed attribute for the descriptor on the wire
Diffstat (limited to 'sys/dev/usb')
-rw-r--r-- | sys/dev/usb/usb_port.h | 2 | ||||
-rw-r--r-- | sys/dev/usb/usbhid.h | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/usb/usb_port.h b/sys/dev/usb/usb_port.h index 61ac382..caf64fa 100644 --- a/sys/dev/usb/usb_port.h +++ b/sys/dev/usb/usb_port.h @@ -296,6 +296,8 @@ __CONCAT(dname,_detach)(self, flags) \ #define clalloc(p, s, x) (clist_alloc_cblocks((p), (s), (s)), 0) #define clfree(p) clist_free_cblocks((p)) +#define UPACKED __attribute__ ((packed)) + #define PWR_RESUME 0 #define PWR_SUSPEND 1 diff --git a/sys/dev/usb/usbhid.h b/sys/dev/usb/usbhid.h index 0379b21..f8f28dc 100644 --- a/sys/dev/usb/usbhid.h +++ b/sys/dev/usb/usbhid.h @@ -1,4 +1,4 @@ -/* $NetBSD: usbhid.h,v 1.4 1999/04/22 01:57:01 augustss Exp $ */ +/* $NetBSD: usbhid.h,v 1.8 2000/05/30 10:10:18 augustss Exp $ */ /* $FreeBSD$ */ /* @@ -64,7 +64,7 @@ typedef struct usb_hid_descriptor { uByte bDescriptorType; uWord wDescriptorLength; } descrs[1]; -} usb_hid_descriptor_t; +} UPACKED usb_hid_descriptor_t; #define USB_HID_DESCRIPTOR_SIZE(n) (9+(n)*3) /* Usage pages */ |