From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:35268) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RvTeM-0004Mg-5B for qemu-devel@nongnu.org; Thu, 09 Feb 2012 08:03:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RvTeA-0007dM-Mq for qemu-devel@nongnu.org; Thu, 09 Feb 2012 08:02:58 -0500 Received: from cantor2.suse.de ([195.135.220.15]:51301 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RvTeA-0007d3-DG for qemu-devel@nongnu.org; Thu, 09 Feb 2012 08:02:46 -0500 Message-ID: <4F33C3F4.2040804@suse.de> Date: Thu, 09 Feb 2012 14:02:44 +0100 From: =?ISO-8859-15?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1328770747-660-1-git-send-email-peter.maydell@linaro.org> In-Reply-To: <1328770747-660-1-git-send-email-peter.maydell@linaro.org> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] hw/arm_sysctl: Drop legacy init function List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: qemu-devel@nongnu.org, patches@linaro.org Am 09.02.2012 07:59, schrieb Peter Maydell: > Drop the legacy init function arm_sysctl_init(), since it has no > users left any more. This allows us to drop the awkward '1' from > the actual device init function. >=20 > Signed-off-by: Peter Maydell No other occurrences in the code, Acked-by: Andreas F=E4rber Andreas > --- > The legacy function also had the 'set property after init' bug (in fact > this is the original source for the copy-n-pasted bits of code in the > board init functions). However since nobody's using it we might as well > get rid of it rather than correcting it... >=20 > hw/arm_sysctl.c | 16 ++-------------- > hw/primecell.h | 3 --- > 2 files changed, 2 insertions(+), 17 deletions(-) >=20 > diff --git a/hw/arm_sysctl.c b/hw/arm_sysctl.c > index 9d25799..7754864 100644 > --- a/hw/arm_sysctl.c > +++ b/hw/arm_sysctl.c > @@ -378,7 +378,7 @@ static void arm_sysctl_gpio_set(void *opaque, int l= ine, int level) > } > } > =20 > -static int arm_sysctl_init1(SysBusDevice *dev) > +static int arm_sysctl_init(SysBusDevice *dev) > { > arm_sysctl_state *s =3D FROM_SYSBUS(arm_sysctl_state, dev); > =20 > @@ -389,18 +389,6 @@ static int arm_sysctl_init1(SysBusDevice *dev) > return 0; > } > =20 > -/* Legacy helper function. */ > -void arm_sysctl_init(uint32_t base, uint32_t sys_id, uint32_t proc_id) > -{ > - DeviceState *dev; > - > - dev =3D qdev_create(NULL, "realview_sysctl"); > - qdev_prop_set_uint32(dev, "sys_id", sys_id); > - qdev_init_nofail(dev); > - qdev_prop_set_uint32(dev, "proc_id", proc_id); > - sysbus_mmio_map(sysbus_from_qdev(dev), 0, base); > -} > - > static Property arm_sysctl_properties[] =3D { > DEFINE_PROP_UINT32("sys_id", arm_sysctl_state, sys_id, 0), > DEFINE_PROP_UINT32("proc_id", arm_sysctl_state, proc_id, 0), > @@ -412,7 +400,7 @@ static void arm_sysctl_class_init(ObjectClass *klas= s, void *data) > DeviceClass *dc =3D DEVICE_CLASS(klass); > SysBusDeviceClass *k =3D SYS_BUS_DEVICE_CLASS(klass); > =20 > - k->init =3D arm_sysctl_init1; > + k->init =3D arm_sysctl_init; > dc->reset =3D arm_sysctl_reset; > dc->vmsd =3D &vmstate_arm_sysctl; > dc->props =3D arm_sysctl_properties; > diff --git a/hw/primecell.h b/hw/primecell.h > index de7d6f2..e709ad3 100644 > --- a/hw/primecell.h > +++ b/hw/primecell.h > @@ -8,9 +8,6 @@ > /* pl080.c */ > void *pl080_init(uint32_t base, qemu_irq irq, int nchannels); > =20 > -/* arm_sysctl.c */ > -void arm_sysctl_init(uint32_t base, uint32_t sys_id, uint32_t proc_id)= ; > - > /* arm_sysctl GPIO lines */ > #define ARM_SYSCTL_GPIO_MMC_WPROT 0 > #define ARM_SYSCTL_GPIO_MMC_CARDIN 1 --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg