qdev: kill DeviceState->name

is redundant with DeviceState->type->name

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
Gerd Hoffmann 2009-05-27 22:54:29 +02:00 committed by Paul Brook
parent 1e9fa73016
commit aca312affb
2 changed files with 1 additions and 3 deletions

View File

@ -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++];

View File

@ -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;