]> Git Repo - qemu.git/blobdiff - hw/usb-wacom.c
ETRAX-SER: qdevify.
[qemu.git] / hw / usb-wacom.c
index 0acafaa88ccdff82d4acd6eead6e95fed66b6af3..eaf0d29eb3a06435f9f719fb10618a980a396a88 100644 (file)
@@ -25,7 +25,9 @@
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  * THE SOFTWARE.
  */
-#include "vl.h"
+#include "hw.h"
+#include "console.h"
+#include "usb.h"
 
 /* Interface requests */
 #define WACOM_GET_REPORT       0x2101
@@ -78,7 +80,7 @@ static const uint8_t qemu_wacom_config_descriptor[] = {
     0x01,      /*  u8  bNumInterfaces; (1) */
     0x01,      /*  u8  bConfigurationValue; */
     0x00,      /*  u8  iConfiguration; */
-    0x80,      /*  u8  bmAttributes; 
+    0x80,      /*  u8  bmAttributes;
                                 Bit 7: must be set,
                                     6: Self-powered,
                                     5: Remote wakeup,
@@ -272,12 +274,12 @@ static int usb_wacom_handle_control(USBDevice *dev, int request, int value,
     case DeviceRequest | USB_REQ_GET_DESCRIPTOR:
         switch (value >> 8) {
         case USB_DT_DEVICE:
-            memcpy(data, qemu_wacom_dev_descriptor, 
+            memcpy(data, qemu_wacom_dev_descriptor,
                    sizeof(qemu_wacom_dev_descriptor));
             ret = sizeof(qemu_wacom_dev_descriptor);
             break;
         case USB_DT_CONFIG:
-                   memcpy(data, qemu_wacom_config_descriptor, 
+                   memcpy(data, qemu_wacom_config_descriptor,
                    sizeof(qemu_wacom_config_descriptor));
             ret = sizeof(qemu_wacom_config_descriptor);
             break;
@@ -395,8 +397,6 @@ USBDevice *usb_wacom_init(void)
     USBWacomState *s;
 
     s = qemu_mallocz(sizeof(USBWacomState));
-    if (!s)
-        return NULL;
     s->dev.speed = USB_SPEED_FULL;
     s->dev.handle_packet = usb_generic_handle_packet;
 
This page took 0.022402 seconds and 4 git commands to generate.