qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH v2 22/30] net/ne2000: substitute ->qdev casts with D


From: peter . crosthwaite
Subject: [Qemu-devel] [PATCH v2 22/30] net/ne2000: substitute ->qdev casts with DEVICE()
Date: Mon, 24 Jun 2013 17:06:13 +1000

From: Peter Crosthwaite <address@hidden>

Signed-off-by: Peter Crosthwaite <address@hidden>
---

 hw/net/ne2000.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/hw/net/ne2000.c b/hw/net/ne2000.c
index 33ee03e..70a7991 100644
--- a/hw/net/ne2000.c
+++ b/hw/net/ne2000.c
@@ -722,6 +722,8 @@ static NetClientInfo net_ne2000_info = {
 static int pci_ne2000_init(PCIDevice *pci_dev)
 {
     PCINE2000State *d = DO_UPCAST(PCINE2000State, dev, pci_dev);
+    DeviceState *ds = DEVICE(pci_dev);
+
     NE2000State *s;
     uint8_t *pci_conf;
 
@@ -737,10 +739,10 @@ static int pci_ne2000_init(PCIDevice *pci_dev)
     ne2000_reset(s);
 
     s->nic = qemu_new_nic(&net_ne2000_info, &s->c,
-                          object_get_typename(OBJECT(pci_dev)), 
pci_dev->qdev.id, s);
+                          object_get_typename(OBJECT(pci_dev)), ds->id, s);
     qemu_format_nic_info_str(qemu_get_queue(s->nic), s->c.macaddr.a);
 
-    add_boot_device_path(s->c.bootindex, &pci_dev->qdev, "/address@hidden");
+    add_boot_device_path(s->c.bootindex, ds, "/address@hidden");
 
     return 0;
 }
-- 
1.8.3.rc1.44.gb387c77.dirty




reply via email to

[Prev in Thread] Current Thread [Next in Thread]