]> Git Repo - qemu.git/blobdiff - hw/tsc2005.c
qemu-ga: move qemu-ga files to qga/
[qemu.git] / hw / tsc2005.c
index a55853c8530540bf6469d111a079be45c58d3eba..9a500ebb3d284824a84cf47108ad119ea755eab4 100644 (file)
@@ -290,7 +290,7 @@ static void tsc2005_pin_update(TSC2005State *s)
     s->precision = s->nextprecision;
     s->function = s->nextfunction;
     s->pdst = !s->pnd0;        /* Synchronised on internal clock */
-    expires = qemu_get_clock(vm_clock) + (get_ticks_per_sec() >> 7);
+    expires = qemu_get_clock_ns(vm_clock) + (get_ticks_per_sec() >> 7);
     qemu_mod_timer(s->timer, expires);
 }
 
@@ -524,12 +524,12 @@ void *tsc2005_init(qemu_irq pintdav)
     TSC2005State *s;
 
     s = (TSC2005State *)
-            qemu_mallocz(sizeof(TSC2005State));
+            g_malloc0(sizeof(TSC2005State));
     s->x = 400;
     s->y = 240;
     s->pressure = 0;
     s->precision = s->nextprecision = 0;
-    s->timer = qemu_new_timer(vm_clock, tsc2005_timer_tick, s);
+    s->timer = qemu_new_timer_ns(vm_clock, tsc2005_timer_tick, s);
     s->pint = pintdav;
     s->model = 0x2005;
 
This page took 0.027597 seconds and 4 git commands to generate.