qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: Gerd Hoffmann <kraxel@redhat.com>
Subject: [Qemu-devel] [PATCH 2/6] qdev/pci: use qdev_prop_pci_devfn
Date: Wed, 15 Jul 2009 13:59:23 +0200	[thread overview]
Message-ID: <1247659167-1177-3-git-send-email-kraxel@redhat.com> (raw)
In-Reply-To: <1247659167-1177-1-git-send-email-kraxel@redhat.com>

Put the new property into use.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 hw/pci.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/hw/pci.c b/hw/pci.c
index 5e2996b..03c7840 100644
--- a/hw/pci.c
+++ b/hw/pci.c
@@ -56,8 +56,8 @@ static struct BusInfo pci_bus_info = {
     .print_dev  = pcibus_dev_print,
     .props      = (Property[]) {
         {
-            .name   = "devfn",
-            .info   = &qdev_prop_uint32,
+            .name   = "addr",
+            .info   = &qdev_prop_pci_devfn,
             .offset = offsetof(PCIDevice, devfn),
             .defval = (uint32_t[]) { -1 },
         },
@@ -779,7 +779,7 @@ PCIDevice *pci_create(const char *name, const char *devaddr)
     }
 
     dev = qdev_create(&bus->qbus, name);
-    qdev_prop_set_uint32(dev, "devfn", devfn);
+    qdev_prop_set_uint32(dev, "addr", devfn);
     return (PCIDevice *)dev;
 }
 
@@ -929,7 +929,7 @@ PCIDevice *pci_create_simple(PCIBus *bus, int devfn, const char *name)
     DeviceState *dev;
 
     dev = qdev_create(&bus->qbus, name);
-    qdev_prop_set_uint32(dev, "devfn", devfn);
+    qdev_prop_set_uint32(dev, "addr", devfn);
     qdev_init(dev);
 
     return (PCIDevice *)dev;
-- 
1.6.2.5

  parent reply	other threads:[~2009-07-15 11:59 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-15 11:59 [Qemu-devel] [PATCH 0/6] qdev: -device switch patches Gerd Hoffmann
2009-07-15 11:59 ` [Qemu-devel] [PATCH 1/6] qdev/prop: add pci devfn property Gerd Hoffmann
2009-07-15 11:59 ` Gerd Hoffmann [this message]
2009-07-15 11:59 ` [Qemu-devel] [PATCH 3/6] qdev: create default bus names Gerd Hoffmann
2009-07-15 11:59 ` [Qemu-devel] [PATCH 4/6] qdev: bus walker + qdev_device_add() Gerd Hoffmann
2009-07-15 11:59 ` [Qemu-devel] [PATCH 5/6] qdev: add -device command line option Gerd Hoffmann
2009-07-15 11:59 ` [Qemu-devel] [PATCH 6/6] switch balloon initialization to -device Gerd Hoffmann
2009-07-22 15:02 ` [Qemu-devel] [PATCH 0/6] qdev: -device switch patches Markus Armbruster

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=1247659167-1177-3-git-send-email-kraxel@redhat.com \
    --to=kraxel@redhat.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).