From patchwork Tue Jan 26 10:55:44 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: 8123401 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 912BBBEEE5 for ; Tue, 26 Jan 2016 14:25:41 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E543620259 for ; Tue, 26 Jan 2016 14:25:40 +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 496CC20222 for ; Tue, 26 Jan 2016 14:25:40 +0000 (UTC) Received: from localhost ([::1]:44347 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aO4Yt-0002Wm-Kl for patchwork-qemu-devel@patchwork.kernel.org; Tue, 26 Jan 2016 09:25:39 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46134) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aO1Ja-00071W-Jw for qemu-devel@nongnu.org; Tue, 26 Jan 2016 05:57:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aO1JX-0003IW-Mb for qemu-devel@nongnu.org; Tue, 26 Jan 2016 05:57:38 -0500 Received: from m12-13.163.com ([220.181.12.13]:38871) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aO1JX-0003Gt-5H for qemu-devel@nongnu.org; Tue, 26 Jan 2016 05:57:35 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id; bh=54maMVdH8ZQOwj99/c qNd0S0BS+Ts8m1QTNnf3YZGE8=; b=E7hR1lOd/LwNU4UbTCtWxy4sKoWucqt4K/ Wo4x7lWFe3n4jACrL3eSEV8QD66NXZDP8UZ17DDqPg7OQt9h9Y/UIsygNBuD81FV jgJ1x9vPJ0Qh+QvzPwzcypx8n7UZBZnip0+ZMjEwBIgX9xDddS5Vx8XVl2EQK+Ee 9ybuKVzfU= Received: from localhost.localdomain (unknown [101.254.142.162]) by smtp9 (Coremail) with SMTP id DcCowACHxebqUKdWJttrAA--.26091S7; Tue, 26 Jan 2016 18:57:06 +0800 (CST) From: xiaoqiang zhao To: qemu-devel@nongnu.org Date: Tue, 26 Jan 2016 18:55:44 +0800 Message-Id: <1453805753-27564-6-git-send-email-zxq_yx_007@163.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1453805753-27564-1-git-send-email-zxq_yx_007@163.com> References: <1453805753-27564-1-git-send-email-zxq_yx_007@163.com> X-CM-TRANSID: DcCowACHxebqUKdWJttrAA--.26091S7 X-Coremail-Antispam: 1Uf129KBjvJXoW7Cr1rJr4rtw48AFW3GF4fAFb_yoW8AryrpF Zru3WDJw13JFWkJFWIkrnrWF1DCFnYkFWvqrnakry0yr1DKry3tF1kAay5A3WUJrZ5Z3W5 Aw1xJr13Aw4UC3DanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07UjdgZUUUUU= X-Originating-IP: [101.254.142.162] X-CM-SenderInfo: 520ts5t0bqili6rwjhhfrp/1tbiFgL7xlWBO3j0-QAAs3 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 220.181.12.13 X-Mailman-Approved-At: Tue, 26 Jan 2016 09:22:12 -0500 Cc: xiaoqiang zhao , peter.maydell@linaro.org, afaerber@suse.de Subject: [Qemu-devel] [PATCH 05/14] hw/timmer: QOM'ify exynos4210_rtc 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_rtc_init to exynos4210_rtc_info.instance_init and drop the SysBusDeviceClass::init Signed-off-by: xiaoqiang zhao --- hw/timer/exynos4210_rtc.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/hw/timer/exynos4210_rtc.c b/hw/timer/exynos4210_rtc.c index bf2ee9f..cfd6d9d 100644 --- a/hw/timer/exynos4210_rtc.c +++ b/hw/timer/exynos4210_rtc.c @@ -546,9 +546,10 @@ static const MemoryRegionOps exynos4210_rtc_ops = { /* * RTC timer initialization */ -static int exynos4210_rtc_init(SysBusDevice *dev) +static void exynos4210_rtc_init(Object *obj) { - Exynos4210RTCState *s = EXYNOS4210_RTC(dev); + Exynos4210RTCState *s = EXYNOS4210_RTC(obj); + SysBusDevice *dev = SYS_BUS_DEVICE(obj); QEMUBH *bh; bh = qemu_bh_new(exynos4210_rtc_tick, s); @@ -566,16 +567,12 @@ static int exynos4210_rtc_init(SysBusDevice *dev) memory_region_init_io(&s->iomem, OBJECT(s), &exynos4210_rtc_ops, s, "exynos4210-rtc", EXYNOS4210_RTC_REG_MEM_SIZE); sysbus_init_mmio(dev, &s->iomem); - - return 0; } static void exynos4210_rtc_class_init(ObjectClass *klass, void *data) { DeviceClass *dc = DEVICE_CLASS(klass); - SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass); - k->init = exynos4210_rtc_init; dc->reset = exynos4210_rtc_reset; dc->vmsd = &vmstate_exynos4210_rtc_state; } @@ -584,6 +581,7 @@ static const TypeInfo exynos4210_rtc_info = { .name = TYPE_EXYNOS4210_RTC, .parent = TYPE_SYS_BUS_DEVICE, .instance_size = sizeof(Exynos4210RTCState), + .instance_init = exynos4210_rtc_init, .class_init = exynos4210_rtc_class_init, };