]> Git Repo - qemu.git/commitdiff
qdev: kill DeviceState->name
authorGerd Hoffmann <[email protected]>
Wed, 27 May 2009 20:54:29 +0000 (22:54 +0200)
committerPaul Brook <[email protected]>
Thu, 4 Jun 2009 10:24:42 +0000 (11:24 +0100)
is redundant with DeviceState->type->name

Signed-off-by: Gerd Hoffmann <[email protected]>
hw/qdev.c
hw/qdev.h

index d945ff9538869407783a4b973d30f073be8fef5e..cedb7728a98f6aa47f48fbf463d82b96c0c67d31 100644 (file)
--- a/hw/qdev.c
+++ b/hw/qdev.c
@@ -84,7 +84,6 @@ DeviceState *qdev_create(BusState *bus, const char *name)
     }
 
     dev = qemu_mallocz(t->size);
-    dev->name = name;
     dev->type = t;
 
     if (!bus) {
@@ -162,7 +161,7 @@ CharDriverState *qdev_init_chardev(DeviceState *dev)
     static int next_serial;
     static int next_virtconsole;
     /* FIXME: This is a nasty hack that needs to go away.  */
-    if (strncmp(dev->name, "virtio", 6) == 0) {
+    if (strncmp(dev->type->name, "virtio", 6) == 0) {
         return virtcon_hds[next_virtconsole++];
     } else {
         return serial_hds[next_serial++];
index 143a1f87347a593c66def9843848e584e368df14..b3cc3eceb69fb0cde87b88e2f3a3c5b0e075134f 100644 (file)
--- a/hw/qdev.h
+++ b/hw/qdev.h
@@ -13,7 +13,6 @@ typedef struct BusState BusState;
 /* This structure should not be accessed directly.  We declare it here
    so that it can be embedded in individual device state structures.  */
 struct DeviceState {
-    const char *name;
     DeviceType *type;
     BusState *parent_bus;
     DeviceProperty *props;
This page took 0.027495 seconds and 4 git commands to generate.