]> 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 b92a034496b4b1368edbcc8b8f90c739be345b1d..14698ce1097c7793e7f7b48423def614a2ed2c8d 100644 (file)
@@ -20,7 +20,6 @@
 
 #include "qemu/osdep.h"
 #include "qemu/log.h"
-#include "hw/hw.h"
 #include "qemu/timer.h"
 #include "sysemu/reset.h"
 #include "ui/console.h"
@@ -490,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;