From: "Andreas Färber" <afaerber@suse.de>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-devel@nongnu.org, patches@linaro.org
Subject: Re: [Qemu-devel] [PATCH] hw/arm_sysctl: Drop legacy init function
Date: Thu, 09 Feb 2012 14:02:44 +0100 [thread overview]
Message-ID: <4F33C3F4.2040804@suse.de> (raw)
In-Reply-To: <1328770747-660-1-git-send-email-peter.maydell@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.
>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
No other occurrences in the code,
Acked-by: Andreas Färber <afaerber@suse.de>
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...
>
> hw/arm_sysctl.c | 16 ++--------------
> hw/primecell.h | 3 ---
> 2 files changed, 2 insertions(+), 17 deletions(-)
>
> 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 line, int level)
> }
> }
>
> -static int arm_sysctl_init1(SysBusDevice *dev)
> +static int arm_sysctl_init(SysBusDevice *dev)
> {
> arm_sysctl_state *s = FROM_SYSBUS(arm_sysctl_state, dev);
>
> @@ -389,18 +389,6 @@ static int arm_sysctl_init1(SysBusDevice *dev)
> return 0;
> }
>
> -/* Legacy helper function. */
> -void arm_sysctl_init(uint32_t base, uint32_t sys_id, uint32_t proc_id)
> -{
> - DeviceState *dev;
> -
> - dev = 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[] = {
> 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 *klass, void *data)
> DeviceClass *dc = DEVICE_CLASS(klass);
> SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
>
> - k->init = arm_sysctl_init1;
> + k->init = arm_sysctl_init;
> dc->reset = arm_sysctl_reset;
> dc->vmsd = &vmstate_arm_sysctl;
> dc->props = 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);
>
> -/* 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
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
prev parent reply other threads:[~2012-02-09 13:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-09 6:59 [Qemu-devel] [PATCH] hw/arm_sysctl: Drop legacy init function Peter Maydell
2012-02-09 13:02 ` Andreas Färber [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4F33C3F4.2040804@suse.de \
--to=afaerber@suse.de \
--cc=patches@linaro.org \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.