]> git.proxmox.com Git - mirror_qemu.git/blobdiff - hw/input/tsc2005.c
Use g_new() & friends where that makes obvious sense
[mirror_qemu.git] / hw / input / tsc2005.c
index f82771e7a7c0f4736c9d83a25b672570f4934af3..14698ce1097c7793e7f7b48423def614a2ed2c8d 100644 (file)
 
 #include "qemu/osdep.h"
 #include "qemu/log.h"
-#include "hw/hw.h"
 #include "qemu/timer.h"
+#include "sysemu/reset.h"
 #include "ui/console.h"
 #include "hw/input/tsc2xxx.h"
+#include "hw/irq.h"
+#include "migration/vmstate.h"
 #include "trace.h"
 
 #define TSC_CUT_RESOLUTION(value, p)   ((value) >> (16 - (p ? 12 : 10)))
@@ -487,8 +489,7 @@ void *tsc2005_init(qemu_irq pintdav)
 {
     TSC2005State *s;
 
-    s = (TSC2005State *)
-            g_malloc0(sizeof(TSC2005State));
+    s = g_new0(TSC2005State, 1);
     s->x = 400;
     s->y = 240;
     s->pressure = false;