From patchwork Thu Apr 17 10:34:02 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 28550 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ve0-f198.google.com (mail-ve0-f198.google.com [209.85.128.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id D1DAB20674 for ; Thu, 17 Apr 2014 11:43:37 +0000 (UTC) Received: by mail-ve0-f198.google.com with SMTP id oz11sf1015554veb.9 for ; Thu, 17 Apr 2014 04:43:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:date :message-id:in-reply-to:references:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=p8Ur4RjcESrJfy0385te/sM2dEmKx+Zwuu+2nRGBBL8=; b=Vc114aJ2vDg+80dexkHJSLm71FuwXrthDbqI2xcT7f+QpzzhFc+zbyLWr1ka2QALyW 5XjIu1siacnMSvj6l64R2cAsercqWrlRFs56SbMnJphRJ4JI1nslvTTnfcRQERs4x4LQ B/LQxeeCUpYO/EX4uYkyEFCV6dxHyt0reNreSSGMgEn2SJkjGe0xuzb4heQPYOIpd7ll cm2cqnJyFlgwemY60NWzGopkJR8lTBZVOE+DsnlYVnUyehIu1jx/4kFqTINke6oGGWa2 nHZEHlREj/zCXVUGh8j8AUX8aDB/5kYCU1OuerT3WPLwh1FZwwwTE8cSTjf52s2VMdCt ppmg== X-Gm-Message-State: ALoCoQn6ihBAJLrvWaRiWzttCvmJ0nWtLDDoFjc6PwSR3Sl/vAVbCvhJ1a8OiivrNjBSz1IEDZo+ X-Received: by 10.236.128.112 with SMTP id e76mr6274409yhi.38.1397735017536; Thu, 17 Apr 2014 04:43:37 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.26.119 with SMTP id 110ls991291qgu.20.gmail; Thu, 17 Apr 2014 04:43:37 -0700 (PDT) X-Received: by 10.58.1.97 with SMTP id 1mr7449849vel.23.1397735017410; Thu, 17 Apr 2014 04:43:37 -0700 (PDT) Received: from mail-vc0-f178.google.com (mail-vc0-f178.google.com [209.85.220.178]) by mx.google.com with ESMTPS id kj3si3796522vdb.114.2014.04.17.04.43.37 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 17 Apr 2014 04:43:37 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.178 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.178; Received: by mail-vc0-f178.google.com with SMTP id im17so361846vcb.9 for ; Thu, 17 Apr 2014 04:43:37 -0700 (PDT) X-Received: by 10.220.101.3 with SMTP id a3mr685158vco.31.1397735017317; Thu, 17 Apr 2014 04:43:37 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp28253vcb; Thu, 17 Apr 2014 04:43:37 -0700 (PDT) X-Received: by 10.140.22.197 with SMTP id 63mr16176105qgn.4.1397735016914; Thu, 17 Apr 2014 04:43:36 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id z3si10393125qcl.8.2014.04.17.04.43.36 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 17 Apr 2014 04:43:36 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Received: from localhost ([::1]:59397 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WajfH-0000YE-Vd for patch@linaro.org; Thu, 17 Apr 2014 06:35:31 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50695) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Waje5-0007f4-T2 for qemu-devel@nongnu.org; Thu, 17 Apr 2014 06:34:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Waje4-0002QA-Nl for qemu-devel@nongnu.org; Thu, 17 Apr 2014 06:34:17 -0400 Received: from mnementh.archaic.org.uk ([2001:8b0:1d0::1]:47842) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Waje4-0002OB-HR for qemu-devel@nongnu.org; Thu, 17 Apr 2014 06:34:16 -0400 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1Wajdx-00022R-R8 for qemu-devel@nongnu.org; Thu, 17 Apr 2014 11:34:09 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Date: Thu, 17 Apr 2014 11:34:02 +0100 Message-Id: <1397730846-7576-48-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1397730846-7576-1-git-send-email-peter.maydell@linaro.org> References: <1397730846-7576-1-git-send-email-peter.maydell@linaro.org> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:8b0:1d0::1 Subject: [Qemu-devel] [PULL 47/51] misc: zynq_slcr: Convert SBD::init to object init 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: peter.maydell@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.178 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 From: Peter Crosthwaite To bring it up to date with styling guidelines. Signed-off-by: Peter Crosthwaite Message-id: 2e837af80a18216c21e73241032e048f39d78b99.1396503037.git.peter.crosthwaite@xilinx.com Signed-off-by: Peter Maydell --- hw/misc/zynq_slcr.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/hw/misc/zynq_slcr.c b/hw/misc/zynq_slcr.c index cc29444..06eba08 100644 --- a/hw/misc/zynq_slcr.c +++ b/hw/misc/zynq_slcr.c @@ -413,15 +413,13 @@ static const MemoryRegionOps slcr_ops = { .endianness = DEVICE_NATIVE_ENDIAN, }; -static int zynq_slcr_init(SysBusDevice *dev) +static void zynq_slcr_init(Object *obj) { - ZynqSLCRState *s = ZYNQ_SLCR(dev); + ZynqSLCRState *s = ZYNQ_SLCR(obj); - memory_region_init_io(&s->iomem, OBJECT(s), &slcr_ops, s, "slcr", + memory_region_init_io(&s->iomem, obj, &slcr_ops, s, "slcr", ZYNQ_SLCR_MMIO_SIZE); - sysbus_init_mmio(dev, &s->iomem); - - return 0; + sysbus_init_mmio(SYS_BUS_DEVICE(obj), &s->iomem); } static const VMStateDescription vmstate_zynq_slcr = { @@ -438,9 +436,7 @@ static const VMStateDescription vmstate_zynq_slcr = { static void zynq_slcr_class_init(ObjectClass *klass, void *data) { DeviceClass *dc = DEVICE_CLASS(klass); - SysBusDeviceClass *sdc = SYS_BUS_DEVICE_CLASS(klass); - sdc->init = zynq_slcr_init; dc->vmsd = &vmstate_zynq_slcr; dc->reset = zynq_slcr_reset; } @@ -450,6 +446,7 @@ static const TypeInfo zynq_slcr_info = { .name = TYPE_ZYNQ_SLCR, .parent = TYPE_SYS_BUS_DEVICE, .instance_size = sizeof(ZynqSLCRState), + .instance_init = zynq_slcr_init, }; static void zynq_slcr_register_types(void)