From patchwork Sat Apr 29 10:49:34 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: zhao xiao qiang X-Patchwork-Id: 9705749 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 94588603F9 for ; Sat, 29 Apr 2017 10:51:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 86B8828636 for ; Sat, 29 Apr 2017 10:51:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7B3C12868E; Sat, 29 Apr 2017 10:51:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, FREEMAIL_FROM,RCVD_IN_DNSWL_HI,RCVD_IN_SORBS_SPAM,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 3D3662868D for ; Sat, 29 Apr 2017 10:51:45 +0000 (UTC) Received: from localhost ([::1]:40571 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d4Pya-0002Ca-9X for patchwork-qemu-devel@patchwork.kernel.org; Sat, 29 Apr 2017 06:51:44 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50599) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d4PxA-0002At-Jc for qemu-devel@nongnu.org; Sat, 29 Apr 2017 06:50:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d4Px5-0003iK-Lw for qemu-devel@nongnu.org; Sat, 29 Apr 2017 06:50:16 -0400 Received: from m12-12.163.com ([220.181.12.12]:42591) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d4Px4-0003dG-Tl for qemu-devel@nongnu.org; Sat, 29 Apr 2017 06:50:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id; bh=CdsybGqzFD5pZDcSWy AcNO8GRjls1e+l9W0oNTiuuEg=; b=HrveGY4NIzTe0Y9XusZqd1iAcYPTR1KrXF kqYeoGK1eM6ZX5V8CACSya9g0ewg3YNYTzpoGXAAiLzkhGKbTub/FeQuPKohvLhP fi1qtIRVx+2XVE+oG/SYCWn9qteXYHlUYA9/yT4wOgQh+IQNvxckrU6OTXGi+FY7 /FekCPgZ0= Received: from localhost.localdomain (unknown [1.203.183.82]) by smtp8 (Coremail) with SMTP id DMCowAAnzhbNbwRZZlhtBA--.26750S3; Sat, 29 Apr 2017 18:49:50 +0800 (CST) From: xiaoqiang zhao To: qemu-devel@nongnu.org Date: Sat, 29 Apr 2017 18:49:34 +0800 Message-Id: <20170429104937.31341-7-zxq_yx_007@163.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170429104937.31341-1-zxq_yx_007@163.com> References: <20170429104937.31341-1-zxq_yx_007@163.com> X-CM-TRANSID: DMCowAAnzhbNbwRZZlhtBA--.26750S3 X-Coremail-Antispam: 1Uf129KBjvdXoW7JryUGw43AF48KF1DKw18uFg_yoWDArX_ua yrCw4fWr4UCwnFga48uws0q34Fyw1UJr1Yya18KF4Iyr4UJ3yUA3s8WF98Cr18Wa43Wa42 9Fs7Jr98KFWxGjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7IUn8hL5UUUUU== X-Originating-IP: [1.203.183.82] X-CM-SenderInfo: 520ts5t0bqili6rwjhhfrp/1tbiFg7IxlWBVt7ubAAAsI X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 220.181.12.12 Subject: [Qemu-devel] [PATCH v2 6/9] hw/timer: QOM'ify m48txx_sysbus (pass 2) X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: edgar.iglesias@xilinx.com, peter.maydell@linaro.org, mark.cave-ayland@ilande.co.uk, pbonzini@redhat.com, atar4qemu@gmail.com, david@gibson.dropbear.id.au Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP assign DeviceClass::vmsd instead of using vmstate_register function Signed-off-by: xiaoqiang zhao Reviewed-by: Philippe Mathieu-Daudé --- hw/timer/m48t59.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/timer/m48t59.c b/hw/timer/m48t59.c index eff259ef96..3a9f541c9b 100644 --- a/hw/timer/m48t59.c +++ b/hw/timer/m48t59.c @@ -640,8 +640,6 @@ void m48t59_realize_common(M48t59State *s, Error **errp) s->wd_timer = timer_new_ns(QEMU_CLOCK_VIRTUAL, &watchdog_cb, s); } qemu_get_timedate(&s->alarm, 0); - - vmstate_register(NULL, -1, &vmstate_m48t59, s); } static void m48t59_init1(Object *obj) @@ -702,6 +700,7 @@ static void m48txx_sysbus_class_init(ObjectClass *klass, void *data) dc->realize = m48t59_realize; dc->reset = m48t59_reset_sysbus; dc->props = m48t59_sysbus_properties; + dc->vmsd = &vmstate_m48t59; nc->read = m48txx_sysbus_read; nc->write = m48txx_sysbus_write; nc->toggle_lock = m48txx_sysbus_toggle_lock;