From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:48543) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sbi8y-0002AT-3d for qemu-devel@nongnu.org; Mon, 04 Jun 2012 21:01:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sbi8v-0002ya-0D for qemu-devel@nongnu.org; Mon, 04 Jun 2012 21:01:07 -0400 Received: from mail-pb0-f45.google.com ([209.85.160.45]:47909) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sbi8u-0002pf-Ov for qemu-devel@nongnu.org; Mon, 04 Jun 2012 21:01:04 -0400 Received: by mail-pb0-f45.google.com with SMTP id ro12so7301786pbb.4 for ; Mon, 04 Jun 2012 18:01:03 -0700 (PDT) Sender: fluxion From: Michael Roth Date: Mon, 4 Jun 2012 20:00:18 -0500 Message-Id: <1338858018-17189-18-git-send-email-mdroth@linux.vnet.ibm.com> In-Reply-To: <1338858018-17189-1-git-send-email-mdroth@linux.vnet.ibm.com> References: <1338858018-17189-1-git-send-email-mdroth@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH 17/17] rtc: use qidl-generated vmstate bindings List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: aliguori@us.ibm.com, quintela@redhat.com, owasserm@redhat.com, yamahata@valinux.co.jp, pbonzini@redhat.com, akong@redhat.com, afaerber@suse.de Make use of the qidl-generated vmstate bindings Signed-off-by: Michael Roth --- hw/mc146818rtc.c | 21 ++------------------- 1 files changed, 2 insertions(+), 19 deletions(-) diff --git a/hw/mc146818rtc.c b/hw/mc146818rtc.c index 2dfc233..14a9b4d 100644 --- a/hw/mc146818rtc.c +++ b/hw/mc146818rtc.c @@ -27,6 +27,7 @@ #include "mc146818rtc.h" #include "mc146818rtc_state.h" #include "qapi-generated/mc146818rtc-qapi-visit.h" +#include "mc146818rtc_vmstate.h" #ifdef TARGET_I386 #include "apic.h" @@ -505,25 +506,7 @@ static const VMStateDescription vmstate_rtc = { .minimum_version_id = 1, .minimum_version_id_old = 1, .post_load = rtc_post_load, - .fields = (VMStateField []) { - VMSTATE_BUFFER(cmos_data, RTCState), - VMSTATE_UINT8(cmos_index, RTCState), - VMSTATE_INT32(current_tm.tm_sec, RTCState), - VMSTATE_INT32(current_tm.tm_min, RTCState), - VMSTATE_INT32(current_tm.tm_hour, RTCState), - VMSTATE_INT32(current_tm.tm_wday, RTCState), - VMSTATE_INT32(current_tm.tm_mday, RTCState), - VMSTATE_INT32(current_tm.tm_mon, RTCState), - VMSTATE_INT32(current_tm.tm_year, RTCState), - VMSTATE_TIMER(periodic_timer, RTCState), - VMSTATE_INT64(next_periodic_time, RTCState), - VMSTATE_INT64(next_second_time, RTCState), - VMSTATE_TIMER(second_timer, RTCState), - VMSTATE_TIMER(second_timer2, RTCState), - VMSTATE_UINT32_V(irq_coalesced, RTCState, 2), - VMSTATE_UINT32_V(period, RTCState, 2), - VMSTATE_END_OF_LIST() - } + .fields = vmstate_rtcstate, }; static void rtc_notify_clock_reset(Notifier *notifier, void *data) -- 1.7.4.1