aboutsummaryrefslogtreecommitdiff
path: root/usb-linux.c
diff options
context:
space:
mode:
authorblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2008-09-15 14:57:11 +0000
committerblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2008-09-15 14:57:11 +0000
commitd9cf15784f68935a25c5ece051ba595fccbc8f6c (patch)
treef7ea3999cfb1b0556201b995e9c92166a53d6e34 /usb-linux.c
parentfe25591e7b98386cce2c9ec8a8878947b50e3741 (diff)
downloadqemu-d9cf15784f68935a25c5ece051ba595fccbc8f6c.zip
qemu-d9cf15784f68935a25c5ece051ba595fccbc8f6c.tar.gz
qemu-d9cf15784f68935a25c5ece051ba595fccbc8f6c.tar.bz2
Define a few structures instead of including a file, add "static"
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5225 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'usb-linux.c')
-rw-r--r--usb-linux.c22
1 files changed, 20 insertions, 2 deletions
diff --git a/usb-linux.c b/usb-linux.c
index 937ff12..91acccd 100644
--- a/usb-linux.c
+++ b/usb-linux.c
@@ -35,11 +35,29 @@
#include <sys/ioctl.h>
#include <signal.h>
-#include <linux/usb/ch9.h>
#include <linux/usbdevice_fs.h>
#include <linux/version.h>
#include "hw/usb.h"
+/* We redefine it to avoid version problems */
+struct usb_ctrltransfer {
+ uint8_t bRequestType;
+ uint8_t bRequest;
+ uint16_t wValue;
+ uint16_t wIndex;
+ uint16_t wLength;
+ uint32_t timeout;
+ void *data;
+};
+
+struct usb_ctrlrequest {
+ uint8_t bRequestType;
+ uint8_t bRequest;
+ uint16_t wValue;
+ uint16_t wIndex;
+ uint16_t wLength;
+};
+
typedef int USBScanFunc(void *opaque, int bus_num, int addr, int class_id,
int vendor_id, int product_id,
const char *product_name, int speed);
@@ -710,7 +728,7 @@ static int do_token_out(USBDevice *dev, USBPacket *p)
*
* Returns length of the transaction or one of the USB_RET_XXX codes.
*/
-int usb_host_handle_packet(USBDevice *s, USBPacket *p)
+static int usb_host_handle_packet(USBDevice *s, USBPacket *p)
{
switch(p->pid) {
case USB_MSG_ATTACH: