summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMarcus Glocker <mglocker@cvs.openbsd.org>2008-08-27 17:31:49 +0000
committerMarcus Glocker <mglocker@cvs.openbsd.org>2008-08-27 17:31:49 +0000
commit83b7578cc977a48e6d153ec8a83dda5ce614871c (patch)
tree419de849545c0a0a38c34e25c3b014dad554bbfc /sys
parent68e7525fc7088b13ff79c9b19d4a1c01d78c7b21 (diff)
Some __packed cleanup; Remove another obsolete pack from a none-hardware
struct and pack all other hardware structs which have been forgotten.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/usb/uvideo.h77
1 files changed, 38 insertions, 39 deletions
diff --git a/sys/dev/usb/uvideo.h b/sys/dev/usb/uvideo.h
index cbef8613f55..ef9a133aecd 100644
--- a/sys/dev/usb/uvideo.h
+++ b/sys/dev/usb/uvideo.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvideo.h,v 1.30 2008/08/26 21:52:48 mglocker Exp $ */
+/* $OpenBSD: uvideo.h,v 1.31 2008/08/27 17:31:48 mglocker Exp $ */
/*
* Copyright (c) 2007 Robert Nagy <robert@openbsd.org>
@@ -162,7 +162,7 @@ struct usb_video_header_desc {
uWord wTotalLength;
uDWord dwClockFrequency;
uByte bInCollection;
-};
+} __packed;
struct usb_video_header_desc_all {
struct usb_video_header_desc *fix;
@@ -178,7 +178,7 @@ struct usb_video_input_terminal_desc {
uWord wTerminalType;
uByte bAssocTerminal;
uByte iTerminal;
-};
+} __packed;
/* Table 3-5: Output Terminal Descriptor */
struct usb_video_output_terminal_desc {
@@ -190,7 +190,7 @@ struct usb_video_output_terminal_desc {
uByte bAssocTerminal;
uByte bSourceID;
uByte iTerminal;
-};
+} __packed;
/* Table 3-6: Camera Terminal Descriptor */
struct usb_video_camera_terminal_desc {
@@ -206,7 +206,7 @@ struct usb_video_camera_terminal_desc {
uWord wOcularFocalLength;
uByte bControlSize;
uByte *bmControls;
-};
+} __packed;
/* Table 3-8: VC Processing Unit Descriptor */
struct usb_video_vc_processing_desc {
@@ -239,7 +239,7 @@ struct usb_video_vc_endpoint_desc {
uByte bDescriptorType;
uByte bDescriptorSubtype;
uWord wMaxTransferSize;
-};
+} __packed;
/* Table 3-13: Interface Input Header Descriptor */
struct usb_video_input_header_desc {
@@ -255,7 +255,7 @@ struct usb_video_input_header_desc {
uByte bTriggerSupport;
uByte bTriggerUsage;
uByte bControlSize;
-};
+} __packed;
struct usb_video_input_header_desc_all {
struct usb_video_input_header_desc *fix;
@@ -388,8 +388,37 @@ struct usb_video_frame_uncompressed_desc {
/*
* Driver specific private definitions.
*/
-#define UVIDEO_NFRAMES_MAX 40
+struct uvideo_format_desc {
+ uByte bLength;
+ uByte bDescriptorType;
+ uByte bDescriptorSubtype;
+ uByte bFormatIndex;
+ uByte bNumFrameDescriptors;
+ union {
+ /* mjpeg */
+ struct {
+ uByte bmFlags;
+ uByte bDefaultFrameIndex;
+ uByte bAspectRatioX;
+ uByte bAspectRatioY;
+ uByte bmInterlaceFlags;
+ uByte bCopyProtect;
+ } mjpeg;
+ /* uncompressed */
+ struct {
+ uByte guidFormat[16];
+ uByte bBitsPerPixel;
+ uByte bDefaultFrameIndex;
+ uByte bAspectRatioX;
+ uByte bAspectRatioY;
+ uByte bmInterlaceFlags;
+ uByte bCopyProtect;
+ } uc;
+ } u;
+} __packed;
+
+#define UVIDEO_NFRAMES_MAX 40
struct uvideo_vs_iface {
struct uvideo_softc *sc;
usbd_xfer_handle xfer;
@@ -420,36 +449,6 @@ struct uvideo_mmap {
};
typedef SIMPLEQ_HEAD(, uvideo_mmap) q_mmap;
-struct uvideo_format_desc {
- uByte bLength;
- uByte bDescriptorType;
- uByte bDescriptorSubtype;
- uByte bFormatIndex;
- uByte bNumFrameDescriptors;
- union {
- /* mjpeg */
- struct {
- uByte bmFlags;
- uByte bDefaultFrameIndex;
- uByte bAspectRatioX;
- uByte bAspectRatioY;
- uByte bmInterlaceFlags;
- uByte bCopyProtect;
- } mjpeg;
-
- /* uncompressed */
- struct {
- uByte guidFormat[16];
- uByte bBitsPerPixel;
- uByte bDefaultFrameIndex;
- uByte bAspectRatioX;
- uByte bAspectRatioY;
- uByte bmInterlaceFlags;
- uByte bCopyProtect;
- } uc;
- } u;
-} __packed;
-
struct uvideo_format_group {
uint32_t pixelformat;
uint8_t format_dfidx;
@@ -465,7 +464,7 @@ struct uvideo_res {
int width;
int height;
int fidx;
-} __packed;
+};
struct uvideo_controls {
int cid;