All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alistair Francis <alistair.francis@xilinx.com>
To: qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org, crosthwaitepeter@gmail.com,
	pbonzini@redhat.com, lig.fnst@cn.fujitsu.com,
	alistair.francis@xilinx.com
Subject: [Qemu-devel] [RFC v1 1/2] qdev-monitor.c: Register reset function if the device has one
Date: Fri, 15 Jan 2016 16:19:11 -0800	[thread overview]
Message-ID: <f5112168b8a81409653a01668f78570a8e919db9.1452902914.git.alistair.francis@xilinx.com> (raw)
In-Reply-To: <cover.1452902914.git.alistair.francis@xilinx.com>

If the device being added when running qdev_device_add() has
a reset function, register it so that it can be called.

Signed-off-by: Alistair Francis <alistair.francis@xilinx.com>
---

 qdev-monitor.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/qdev-monitor.c b/qdev-monitor.c
index 3ce4710..8e43074 100644
--- a/qdev-monitor.c
+++ b/qdev-monitor.c
@@ -560,6 +560,8 @@ DeviceState *qdev_device_add(QemuOpts *opts, Error **errp)
 
     if (bus) {
         qdev_set_parent_bus(dev, bus);
+    } else if (dc->reset) {
+        qemu_register_reset((void (*)(void *))dc->reset, dev);
     }
 
     id = qemu_opts_id(opts);
-- 
2.5.0

  reply	other threads:[~2016-01-16  0:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-16  0:19 [Qemu-devel] [RFC v1 0/2] Add a generic loader Alistair Francis
2016-01-16  0:19 ` Alistair Francis [this message]
2016-01-16  0:19 ` [Qemu-devel] [RFC v1 2/2] generic-loader: " Alistair Francis
2016-01-28 20:59 ` [Qemu-devel] [RFC v1 0/2] " Christopher Covington
2016-01-28 21:43   ` Alistair Francis

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=f5112168b8a81409653a01668f78570a8e919db9.1452902914.git.alistair.francis@xilinx.com \
    --to=alistair.francis@xilinx.com \
    --cc=crosthwaitepeter@gmail.com \
    --cc=lig.fnst@cn.fujitsu.com \
    --cc=pbonzini@redhat.com \
    --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.