提交 aca312af 编写于 作者: G Gerd Hoffmann 提交者: Paul Brook

qdev: kill DeviceState->name

is redundant with DeviceState->type->name
Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
上级 1e9fa730
...@@ -84,7 +84,6 @@ DeviceState *qdev_create(BusState *bus, const char *name) ...@@ -84,7 +84,6 @@ DeviceState *qdev_create(BusState *bus, const char *name)
} }
dev = qemu_mallocz(t->size); dev = qemu_mallocz(t->size);
dev->name = name;
dev->type = t; dev->type = t;
if (!bus) { if (!bus) {
...@@ -162,7 +161,7 @@ CharDriverState *qdev_init_chardev(DeviceState *dev) ...@@ -162,7 +161,7 @@ CharDriverState *qdev_init_chardev(DeviceState *dev)
static int next_serial; static int next_serial;
static int next_virtconsole; static int next_virtconsole;
/* FIXME: This is a nasty hack that needs to go away. */ /* 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++]; return virtcon_hds[next_virtconsole++];
} else { } else {
return serial_hds[next_serial++]; return serial_hds[next_serial++];
......
...@@ -13,7 +13,6 @@ typedef struct BusState BusState; ...@@ -13,7 +13,6 @@ typedef struct BusState BusState;
/* This structure should not be accessed directly. We declare it here /* This structure should not be accessed directly. We declare it here
so that it can be embedded in individual device state structures. */ so that it can be embedded in individual device state structures. */
struct DeviceState { struct DeviceState {
const char *name;
DeviceType *type; DeviceType *type;
BusState *parent_bus; BusState *parent_bus;
DeviceProperty *props; DeviceProperty *props;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册