From: Gerd Hoffmann Date: Wed, 27 May 2009 20:54:29 +0000 (+0200) Subject: qdev: kill DeviceState->name X-Git-Tag: v0.11.0-rc0~467 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=aca312affb616a907ae95eb7d9034e85512d6e7c;p=qemu-xen-4.4-testing.git qdev: kill DeviceState->name is redundant with DeviceState->type->name Signed-off-by: Gerd Hoffmann --- diff --git a/hw/qdev.c b/hw/qdev.c index d945ff953..cedb7728a 100644 --- 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++]; diff --git a/hw/qdev.h b/hw/qdev.h index 143a1f873..b3cc3eceb 100644 --- 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;