From patchwork Wed Jan 27 02:54:37 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: zhao xiao qiang X-Patchwork-Id: 8128821 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 838099F9E8 for ; Wed, 27 Jan 2016 02:59:09 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C922E2028D for ; Wed, 27 Jan 2016 02:59:08 +0000 (UTC) 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.kernel.org (Postfix) with ESMTPS id 323C020279 for ; Wed, 27 Jan 2016 02:59:08 +0000 (UTC) Received: from localhost ([::1]:47912 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aOGK3-00043D-Kc for patchwork-qemu-devel@patchwork.kernel.org; Tue, 26 Jan 2016 21:59:07 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54614) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aOGI8-0007bW-Ry for qemu-devel@nongnu.org; Tue, 26 Jan 2016 21:57:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aOGI7-00064v-P6 for qemu-devel@nongnu.org; Tue, 26 Jan 2016 21:57:08 -0500 Received: from m12-18.163.com ([220.181.12.18]:39424) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aOGI7-00064X-7K for qemu-devel@nongnu.org; Tue, 26 Jan 2016 21:57:07 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id; bh=JCuZkUyh4PwIDpPua0 ZoS6Ub+NgQHXn76KCtuStPW6w=; b=DlrLqypQR6G8hzzddTQrBU+sMTSEfvi9MJ 1Fsx7+ZyHRLC8mdtGya65cF7dhjCbOfzmV9sv/oY2/GHXGFFJJa8VfayP4apzNkr ZbV1ZuNiUozBTb5G0vGw9IZLrn1LC5lmq8nQe2uumqh9dQiMiC39UwSZ+IWD3ond 80b+H/FvQ= Received: from localhost.localdomain (unknown [118.187.28.42]) by smtp14 (Coremail) with SMTP id EsCowECZxFTKMahWzrGhAA--.213S5; Wed, 27 Jan 2016 10:56:41 +0800 (CST) From: xiaoqiang zhao To: qemu-devel@nongnu.org Date: Wed, 27 Jan 2016 10:54:37 +0800 Message-Id: <1453863283-7562-4-git-send-email-zxq_yx_007@163.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1453863283-7562-1-git-send-email-zxq_yx_007@163.com> References: <1453863283-7562-1-git-send-email-zxq_yx_007@163.com> X-CM-TRANSID: EsCowECZxFTKMahWzrGhAA--.213S5 X-Coremail-Antispam: 1Uf129KBjvJXoW7Ar47XrykJrW7XrW7Ar18Xwb_yoW8Ww13pF ZruF17A3yfJrZ7AF4IyF1DW3WDC3Z5Crs2qrn3Cry8Aw12gr9Fy3WkAay7Aa18JrZ5AF15 AFy8Jr15CF1UJ3DanT9S1TB71UUUUUDqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07ULo7NUUUUU= X-Originating-IP: [118.187.28.42] X-CM-SenderInfo: 520ts5t0bqili6rwjhhfrp/1tbiFgr8xlWBO4RPRQAAsH X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 220.181.12.18 Cc: xiaoqiang zhao , peter.maydell@linaro.org, afaerber@suse.de Subject: [Qemu-devel] [PATCH v2 03/14] hw/timer: QOM'ify exynos4210_mct X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP assign exynos4210_mct_init to exynos4210_mct_info.instance_init and drop the SysBusDeviceClass::init Signed-off-by: xiaoqiang zhao Reviewed-by: Peter Maydell --- hw/timer/exynos4210_mct.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/hw/timer/exynos4210_mct.c b/hw/timer/exynos4210_mct.c index 015bbaf..ed388ca 100644 --- a/hw/timer/exynos4210_mct.c +++ b/hw/timer/exynos4210_mct.c @@ -1421,10 +1421,11 @@ static const MemoryRegionOps exynos4210_mct_ops = { }; /* MCT init */ -static int exynos4210_mct_init(SysBusDevice *dev) +static void exynos4210_mct_init(Object *obj) { int i; - Exynos4210MCTState *s = EXYNOS4210_MCT(dev); + Exynos4210MCTState *s = EXYNOS4210_MCT(obj); + SysBusDevice *dev = SYS_BUS_DEVICE(obj); QEMUBH *bh[2]; /* Global timer */ @@ -1452,16 +1453,12 @@ static int exynos4210_mct_init(SysBusDevice *dev) memory_region_init_io(&s->iomem, OBJECT(s), &exynos4210_mct_ops, s, "exynos4210-mct", MCT_SFR_SIZE); sysbus_init_mmio(dev, &s->iomem); - - return 0; } static void exynos4210_mct_class_init(ObjectClass *klass, void *data) { DeviceClass *dc = DEVICE_CLASS(klass); - SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass); - k->init = exynos4210_mct_init; dc->reset = exynos4210_mct_reset; dc->vmsd = &vmstate_exynos4210_mct_state; } @@ -1470,6 +1467,7 @@ static const TypeInfo exynos4210_mct_info = { .name = TYPE_EXYNOS4210_MCT, .parent = TYPE_SYS_BUS_DEVICE, .instance_size = sizeof(Exynos4210MCTState), + .instance_init = exynos4210_mct_init, .class_init = exynos4210_mct_class_init, };